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:
Petr Viktorin authored and Tomas Babej committed 2015-08-12 18:17:23 +02:00
1 parent a651be3eec
commit 27dabb4528
118 files changed
+661 -661

No files matched your search

+2 -2
View File
@@ -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: