mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 08:59:57 -06:00
Modernize 'except' clauses
The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
1 parent
a651be3eec
commit
27dabb4528
118 files changed
+661
-661
No files matched your search
@@ -936,7 +936,7 @@ class LogManager(object):
|
||||
if value is not None:
|
||||
try:
|
||||
level = parse_log_level(value)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
raise ValueError("could not set %s (%s)" % (attr, e))
|
||||
setattr(self, attr, level)
|
||||
|
||||
@@ -1239,7 +1239,7 @@ class LogManager(object):
|
||||
if level is not None:
|
||||
try:
|
||||
level = parse_log_level(level)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
print >>sys.stderr, 'could not set handler log level "%s" (%s)' % (level, e)
|
||||
level = None
|
||||
if level is None:
|
||||
|
||||
Reference in new issue
Block a user