diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-02-07 08:33:56 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-02-07 08:43:40 -0500 |
commit | 3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5 (patch) | |
tree | 91925a80ab4acca73da569973cf83376e3cb69ce | |
parent | 0b77cfa1e9c4d5aaf9bf827ddd6a6f26cf5a0f09 (diff) | |
download | ipmi-fru-parser-3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5.tar.gz ipmi-fru-parser-3d0ce84bdfb68dedd1344e8ced509db49dd1a4d5.zip |
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>
-rwxr-xr-x | scripts/fru_gen.py | 2 |
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 |