]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
install: use get() in _get_config_value_for_remote
authorSage Weil <sage@inktank.com>
Wed, 21 Aug 2013 23:45:46 +0000 (16:45 -0700)
committerSage Weil <sage@inktank.com>
Wed, 21 Aug 2013 23:45:46 +0000 (16:45 -0700)
Fixes: #6080
Signed-off-by: Sage Weil <sage@inktank.com>
Tested-by: Tamil Muthamizhan <tamil.muthamizhan@inktank.com>
teuthology/task/install.py

index 9fd907b87c0351c3458327c1494f5e653b167a2f..f1f5a32d1e176b2d2b1361540fd5174183ec99c8 100644 (file)
@@ -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):