]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
config.py: rename local function variable conf to conf_file
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 21 Mar 2013 14:08:43 +0000 (15:08 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 21 Mar 2013 14:08:43 +0000 (15:08 +0100)
Used variable name redefining 'conf' from outer scope.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph_deploy/config.py

index 749c5548bd39ee03f145c12c577dd6576cc2c6da..f12ae8f8ee78a141d0b6bd0ba8e745a214801673 100644 (file)
@@ -56,18 +56,18 @@ def config_pull(args):
             LOG.debug('Checking %s for %s', hostname, frompath)
             sudo = args.pushy('ssh+sudo:{hostname}'.format(hostname=hostname))
             get_file_r = sudo.compile(get_file)
-            conf = get_file_r(path=frompath)
-            if conf is not None:
+            conf_file = get_file_r(path=frompath)
+            if conf_file is not None:
                 LOG.debug('Got %s from %s', frompath, hostname)
                 if os.path.exists(topath):
                     with file(topath, 'rb') as f:
                         existing = f.read()
-                        if existing != conf and not args.overwrite_conf:
+                        if existing != conf_file and not args.overwrite_conf:
                             LOG.error('local config file %s exists with different content; use --overwrite-conf to overwrite' % topath)
                             raise
 
                 with file(topath, 'w') as f:
-                    f.write(conf)
+                    f.write(conf_file)
                 return
             LOG.debug('Empty or missing %s on %s', frompath, hostname)
         except: