[metadata] Stop crashing on empty path from .treeinfo

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-03-16 15:24:37 +01:00
parent aab22b6f9f
commit f5897eccbb
1 changed files with 4 additions and 0 deletions

View File

@ -293,6 +293,10 @@ def write_tree_info(compose, arch, variant, timestamp=None):
ti.images.images[platform] = {}
ti.tree.platforms.add(platform)
for image, path in bi_ti.images.images[platform].items():
if not path:
# The .treeinfo file contains an image without a path.
# We can't add that.
continue
ti.images.images[platform][image] = path
ti.checksums.add(path, "sha256", root_dir=os_tree)