summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-reports
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-04-27 14:36:47 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-04-27 14:36:47 -0500
commit90a669edc4b5f25baf4ad0f30564bede357b991f (patch)
tree5dcf9633c0de7396b394ec72ac7bc845fcb5e195 /src/sbin/bcfg2-reports
parentd3348a34c78ba13d4d4c3e96db19faeeeefac11b (diff)
downloadbcfg2-90a669edc4b5f25baf4ad0f30564bede357b991f.tar.gz
bcfg2-90a669edc4b5f25baf4ad0f30564bede357b991f.tar.bz2
bcfg2-90a669edc4b5f25baf4ad0f30564bede357b991f.zip
src/sbin: Add full PY3K compatibility
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/sbin/bcfg2-reports')
-rwxr-xr-xsrc/sbin/bcfg2-reports16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sbin/bcfg2-reports b/src/sbin/bcfg2-reports
index 559e9fb43..20288fc5e 100755
--- a/src/sbin/bcfg2-reports
+++ b/src/sbin/bcfg2-reports
@@ -93,13 +93,13 @@ def print_fields(fields, cli, max_name, entrydict):
if len(entrydict) > 0:
display += " "
display += str(entrydict[cli])
- print display
+ print(display)
def print_entry(item, max_name):
fmt = ("%%-%ds " % (max_name))
fdata = item.entry.kind + ":" + item.entry.name
display = fmt % (fdata)
- print display
+ print(display)
fields = ""
sort = ""
@@ -137,14 +137,14 @@ if expire != "":
if expire == c_inst.name:
if c_inst.expiration == None:
c_inst.expiration = datetime.datetime.now()
- print "Host expired."
+ print("Host expired.")
else:
c_inst.expiration = None
- print "Host un-expired."
+ print("Host un-expired.")
c_inst.save()
elif '-h' in args:
- print """Usage: bcfg2-reports [option] ...
+ print("""Usage: bcfg2-reports [option] ...
Options and arguments (and corresponding environment variables):
-a : shows all hosts, including expired hosts
@@ -170,13 +170,13 @@ Options and arguments (and corresponding environment variables):
(name,time,state)
--sort=ARG1,ARG2,... : sorts output on ARG1,ARG2,... (name,time,state)
--stale : shows hosts which haven't run in the last 24 hours
-"""
+""")
elif singlehost != "":
for c_inst in c_list:
if singlehost == c_inst.name:
baditems = c_inst.current_interaction.bad()
if len(baditems) > 0 and ('-b' in args or '-s' in args):
- print "Bad Entries:"
+ print("Bad Entries:")
max_name = -1
for item in baditems:
if len(item.entry.name) > max_name:
@@ -185,7 +185,7 @@ elif singlehost != "":
print_entry(item, max_name)
extraitems = c_inst.current_interaction.extra()
if len(extraitems) > 0 and ('-e' in args or '-s' in args):
- print "Extra Entries:"
+ print("Extra Entries:")
max_name = -1
for item in extraitems:
if len(item.entry.name) > max_name: