From 3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Tue, 7 Feb 2017 08:33:56 -0500 Subject: fru_gen: Handle empty yaml files Allow the build to work in the event of an empty YAML file. Change-Id: I3d36b57852446959aeb836ab69958c16387c02fc Signed-off-by: Brad Bishop --- scripts/fru_gen.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/fru_gen.py b/scripts/fru_gen.py index 391bb5f..aca86e8 100755 --- a/scripts/fru_gen.py +++ b/scripts/fru_gen.py @@ -10,6 +10,8 @@ from mako.template import Template def generate_hpp(inventory_yaml, output_dir): with open(os.path.join(script_dir, inventory_yaml), 'r') as f: ifile = yaml.safe_load(f) + if not isinstance(ifile, dict): + ifile = {} # Render the mako template -- cgit v1.2.1