summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-02-07 08:33:56 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-02-07 08:43:40 -0500
commit3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5 (patch)
tree91925a80ab4acca73da569973cf83376e3cb69ce /scripts
parent0b77cfa1e9c4d5aaf9bf827ddd6a6f26cf5a0f09 (diff)
downloadipmi-fru-parser-3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5.zip
ipmi-fru-parser-3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5.tar.gz
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 <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fru_gen.py2
1 files changed, 2 insertions, 0 deletions
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
OpenPOWER on IntegriCloud