handle empty zuul config files
If the zuul configuration files exist in tree but are empty we get None instead of an empty iterable. Change-Id: I9345b91527502880b55390466e363e2f0a1702a7 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
d8d8bd2661
commit
300479609f
@ -317,7 +317,7 @@ def find_project_settings_in_repo(repo_dir):
|
||||
LOG.debug('looking for zuul config in %s',
|
||||
candidate)
|
||||
with open(candidate, 'r', encoding='utf-8') as f:
|
||||
settings = yaml.load(f)
|
||||
settings = yaml.load(f) or []
|
||||
for block in settings:
|
||||
if 'project' in block:
|
||||
LOG.debug('using zuul config from %s',
|
||||
|
Loading…
Reference in New Issue
Block a user