From 5227533c2f80f2b4b2927f9462b490852e758cc9 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 12 Nov 2007 19:30:28 +0000 Subject: bcfg2-admin pull fixes git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3947 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Cfg.py | 10 +++++----- src/lib/Server/Plugins/SSHbase.py | 2 +- 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 -- cgit v1.2.3-1-g7c22