summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorBohuslav Kabrda <bkabrda@redhat.com>2014-12-12 11:04:40 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-01-13 10:25:37 +0100
commit341a00311680a440d7f979f06c34c70d86c9367a (patch)
tree95fdcbed6ddffb50958174c42157ceecaa06ac66 /contrib
parentfaae3d55e5cf416f16158d3b9f8c8fd475ac6acf (diff)
downloadsssd-341a00311680a440d7f979f06c34c70d86c9367a.tar.gz
sssd-341a00311680a440d7f979f06c34c70d86c9367a.tar.xz
sssd-341a00311680a440d7f979f06c34c70d86c9367a.zip
Python3 support in SSSD
https://fedorahosted.org/sssd/ticket/2017
Diffstat (limited to 'contrib')
-rw-r--r--contrib/rhel/update_debug_levels.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/rhel/update_debug_levels.py b/contrib/rhel/update_debug_levels.py
index a9462625f..a260ec1e8 100644
--- a/contrib/rhel/update_debug_levels.py
+++ b/contrib/rhel/update_debug_levels.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
import os
import sys
import shutil
@@ -27,19 +29,19 @@ by default""")
help="Be verbose")
(options, args) = parser.parse_args()
if len(args) > 0:
- print >>sys.stderr, "Stray arguments: %s" % ' '.join([a for a in args])
+ print("Stray arguments: %s" % ' '.join([a for a in args]), file=sys.stderr)
return None
return options
def verbose(msg, verbosity):
if verbosity:
- print msg
+ print(msg)
def main():
options = parse_options()
if not options:
- print >> sys.stderr, "Cannot parse options"
+ print("Cannot parse options", file=sys.stderr)
return 1
# Import the current config file
@@ -47,8 +49,8 @@ def main():
sssdconfig = SSSDConfig.SSSDConfig()
sssdconfig.import_config()
- except Exception, e:
- print "Error: %s" % e
+ except Exception as e:
+ print("Error: %s" % e)
verbose(traceback.format_exc(), options.verbose)
return 2