diff options
author | Bohuslav Kabrda <bkabrda@redhat.com> | 2014-12-12 11:04:40 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-02-13 18:36:50 +0100 |
commit | 9687d7db79e15846de385537a99525d11cae6a15 (patch) | |
tree | d8d201e1a95841acd1cd1e8b0b2d92038590b053 /contrib/rhel | |
parent | dc13b1aff629b0271eb6b75a9f3bdb43c9767093 (diff) | |
download | sssd-9687d7db79e15846de385537a99525d11cae6a15.tar.gz sssd-9687d7db79e15846de385537a99525d11cae6a15.tar.xz sssd-9687d7db79e15846de385537a99525d11cae6a15.zip |
Python3 support in SSSD
https://fedorahosted.org/sssd/ticket/2017
(cherry picked from commit 341a00311680a440d7f979f06c34c70d86c9367a)
Diffstat (limited to 'contrib/rhel')
-rw-r--r-- | contrib/rhel/update_debug_levels.py | 12 |
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 |