summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-04-23 03:10:27 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-04-23 03:10:27 +0000
commit71c7f386c08059234dda65bd153c3bec7ff2aca9 (patch)
tree56358e42caa39c8f924736bd822ae615b382dfff /src/sbin/bcfg2
parent92d2aa13373111c83f4077009a0b33b61a5bb015 (diff)
downloadbcfg2-71c7f386c08059234dda65bd153c3bec7ff2aca9.tar.gz
bcfg2-71c7f386c08059234dda65bd153c3bec7ff2aca9.tar.bz2
bcfg2-71c7f386c08059234dda65bd153c3bec7ff2aca9.zip
Fix some simple python 2to3 changes
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5170 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2')
-rwxr-xr-xsrc/sbin/bcfg218
1 files changed, 9 insertions, 9 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 039f5387a..c7cec10d8 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -128,8 +128,8 @@ class Client:
self.setup.parse(sys.argv[1:])
if self.setup['args']:
- print "Bcfg2 takes no arguments, only options"
- print self.setup.buildHelpMessage()
+ print("Bcfg2 takes no arguments, only options")
+ print(self.setup.buildHelpMessage())
raise SystemExit(1)
level = 30
if self.setup['verbose']:
@@ -148,16 +148,16 @@ class Client:
if self.setup['remove'] not in [False, 'all', 'services', 'packages']:
self.logger.error("Got unknown argument %s for -r" % (self.setup['remove']))
if (self.setup["file"] != False) and (self.setup["cache"] != False):
- print "cannot use -f and -c together"
+ print("cannot use -f and -c together")
raise SystemExit(1)
if (self.setup["agent"] != False) and (self.setup["interactive"] != False):
- print "cannot use -A and -I together"
+ print("cannot use -A and -I together")
raise SystemExit(1)
if (self.setup["agent"] and not self.setup["fingerprint"]):
- print "Agent mode requires specification of x509 fingerprint"
+ print("Agent mode requires specification of x509 fingerprint")
raise SystemExit(1)
if (self.setup["agent"] and not self.setup["key"]):
- print "Agent mode requires specification of ssl cert + key file"
+ print("Agent mode requires specification of ssl cert + key file")
raise SystemExit(1)
def run_probe(self, probe):
@@ -267,7 +267,7 @@ class Client:
self.logger.info(self.setup['decision_list'])
except xmlrpclib.Fault, f:
if f.faultCode == 1:
- print "GetDecisionList method not supported by server"
+ print("GetDecisionList method not supported by server")
else:
self.logger.error("Failed to de", exc_info=1)
raise SystemExit(1)
@@ -380,8 +380,8 @@ class Agent(Bcfg2.Component.Component):
elif self.setup["server"]:
port = int(self.setup["server"].split(':')[1])
else:
- print "port or server URL not specified"
- raise SystemExit, 1
+ print("port or server URL not specified")
+ raise SystemExit(1)
location = (socket.gethostname(), port)