From: Kefu Chai Date: Tue, 23 Jun 2020 09:00:54 +0000 (+0800) Subject: teuthology/run: use default value for better readability X-Git-Tag: 1.1.0~82^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b9fe404403db8f983a402ed64b85a2a292de66af;p=teuthology.git teuthology/run: use default value for better readability Signed-off-by: Kefu Chai --- diff --git a/teuthology/run.py b/teuthology/run.py index be97b63e0..5ecd2f6e1 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -167,9 +167,9 @@ def validate_tasks(config): def get_initial_tasks(lock, config, machine_type): init_tasks = [] - overrides = config.get('overrides') - having_repos = ('install' in config and 'repos' in config.get('install')) \ - or (overrides and 'install' in overrides and 'repos' in overrides.get('install')) + overrides = config.get('overrides', {}) + having_repos = ('repo' in config.get('install', {}) or + 'repo' in overrides.get('install', {})) if not ('redhat' in config or having_repos): init_tasks += [ {'internal.check_packages': None},