Merge "Gracefully handle empty config json data"

This commit is contained in:
Zuul 2019-05-09 18:57:21 +00:00 committed by Gerrit Code Review
commit 9b1035ebb0
1 changed files with 5 additions and 0 deletions

View File

@ -552,6 +552,11 @@ for infile in infiles:
with open(infile) as f:
infile_data = json.load(f)
# if the contents of the file is None, we need should just create an empty
# data set see LP#1828295
if not infile_data:
infile_data = {}
for k, v in iter(infile_data.items()):
config_volumes = match_config_volumes(config_volume_prefix, v)
config_hashes = [get_config_hash(volume_path) for volume_path in config_volumes]