ostree: Fix crash when extra repos are missing

The default needs to be an empty list, not `None`.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-02-22 15:48:06 +01:00
parent 857aee05c1
commit 3162fea60d
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class Tree(OSTree):
if self.extra_config:
self.extra_config = json.load(open(self.extra_config, 'r'))
source_repo_from = self.extra_config.get('source_repo_from', None)
extra_source_repos = self.extra_config.get('extra_source_repos', None)
extra_source_repos = self.extra_config.get('extra_source_repos', [])
keep_original_sources = self.extra_config.get('keep_original_sources', False)
repos = extra_source_repos + [{'name': 'source_repo_from', 'baseurl': source_repo_from}]
tweak_treeconf(self.treefile, source_repos=repos, keep_original_sources=keep_original_sources)