metadata: handle empty YAML files without crashing

!311
This commit is contained in:
Hans-Christoph Steiner 2017-07-26 18:21:28 -07:00
parent 7bd171480f
commit c67f8e349c
2 changed files with 17 additions and 8 deletions

View file

@ -989,7 +989,8 @@ def parse_json_metadata(mf, app):
def parse_yaml_metadata(mf, app):
yamldata = yaml.load(mf, Loader=YamlLoader)
app.update(yamldata)
if yamldata:
app.update(yamldata)
return app