From: Sage Weil Date: Wed, 21 Aug 2013 23:45:46 +0000 (-0700) Subject: install: use get() in _get_config_value_for_remote X-Git-Tag: 1.1.0~1952 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=de270b080b7a59ce198dc3df601880d830f386db;p=teuthology.git install: use get() in _get_config_value_for_remote Fixes: #6080 Signed-off-by: Sage Weil Tested-by: Tamil Muthamizhan --- diff --git a/teuthology/task/install.py b/teuthology/task/install.py index 9fd907b87..f1f5a32d1 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -74,13 +74,12 @@ def _get_config_value_for_remote(ctx, remote, config, key): roles = ctx.cluster.remotes[remote] if 'all' in config: - return config['all'][key] + return config['all'].get(key) elif roles: for role in roles: if role in config and key in config[role]: - return config[role][key] - if key in config: - return config[key] + return config[role].get(key) + return config.get(key) def _get_baseurlinfo_and_dist(ctx, remote, config):