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
2015-08-12 18:17:23 +02:00
committed by Tomas Babej
parent a651be3eec
commit 27dabb4528
118 changed files with 661 additions and 661 deletions
+3 -3
View File
@@ -127,14 +127,14 @@ class Executioner(Backend):
if _name not in self.Command:
raise CommandError(name=_name)
result = self.Command[_name](*args, **options)
except PublicError, e:
except PublicError as e:
error = e
except StandardError, e:
except StandardError as e:
self.exception(
'non-public: %s: %s', e.__class__.__name__, str(e)
)
error = InternalError()
except Exception, e:
except Exception as e:
self.exception(
'unhandled exception: %s: %s', e.__class__.__name__, str(e)
)