mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-14 06:54:55 -05: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:
committed by
Tomas Babej
parent
a651be3eec
commit
27dabb4528
+3
-3
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user