summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-11-12 19:30:28 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-11-12 19:30:28 +0000
commit5227533c2f80f2b4b2927f9462b490852e758cc9 (patch)
treea45efd6ca738b4d3368e0bd5827a03b9916dfdab /src
parentf6dc08b348c1464801c47a3ceebf935f3981fec6 (diff)
downloadbcfg2-5227533c2f80f2b4b2927f9462b490852e758cc9.tar.gz
bcfg2-5227533c2f80f2b4b2927f9462b490852e758cc9.tar.bz2
bcfg2-5227533c2f80f2b4b2927f9462b490852e758cc9.zip
bcfg2-admin pull fixes
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3947 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Cfg.py10
-rw-r--r--src/lib/Server/Plugins/SSHbase.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index afce2c489..fafc8ec94 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -382,7 +382,7 @@ class Cfg(Bcfg2.Server.Plugin.Plugin):
if metadata_updates:
if hasattr(self.Entries['ConfigFile'][entry_name], 'infoxml'):
print "InfoXML support not yet implemented"
- elif raw_input("Should metadata updates apply to all hosts? (n/Y) ") in 'yY':
+ elif raw_input("Should metadata updates apply to all hosts? (n/Y) ") in ['Y', 'y']:
self.entries[entry_name].metadata.update(metadata_updates)
infofile = open(self.entries[entry_name].repopath + '/:info', 'w')
for x in self.entries[entry_name].metadata.iteritems():
@@ -399,13 +399,13 @@ class Cfg(Bcfg2.Server.Plugin.Plugin):
basefile = [frag for frag in \
self.entries[entry_name].fragments \
if frag.applies(meta)][-1]
- gsq = "Should this change apply to this host of all hosts effected by file %s? (N/y): " % (basefile.name)
+ gsq = "Should this change apply to all hosts effected by file %s? (N/y): " % (basefile.name)
if ".H_%s" % (meta.hostname) in basefile.name:
answer = raw_input(hsq % basefile.name)
else:
answer = raw_input(gsq)
-
- if answer in 'Yy':
+
+ if answer in ['Y', 'y']:
print "writing file, %s" % basefile.name
if fulldata:
newdata = fulldata
@@ -423,7 +423,7 @@ class Cfg(Bcfg2.Server.Plugin.Plugin):
else:
newname = basefile.name + ".H_%s" % (meta.hostname)
print "This file will be installed as file %s" % newname
- if raw_input("Should it be installed? (N/y): ") in 'Yy':
+ if raw_input("Should it be installed? (N/y): ") in ['Y', 'y']:
print "writing file, %s" % newname
if fulldata:
newdata = fulldata
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py
index 41b58da20..a2149611d 100644
--- a/src/lib/Server/Plugins/SSHbase.py
+++ b/src/lib/Server/Plugins/SSHbase.py
@@ -186,7 +186,7 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.DirectoryBacked):
filename = "%s/%s.H_%s" % (self.data, entry_name.split('/')[-1],
meta.hostname)
print "This file will be installed as file %s" % filename
- if raw_input("Should it be installed? (N/y): ") in 'Yy':
+ if raw_input("Should it be installed? (N/y): ") in ['Y', 'y']:
print "writing file, %s" % filename
if fulldata:
newdata = fulldata