mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -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:
committed by
Tomas Babej
parent
a651be3eec
commit
27dabb4528
@@ -1002,7 +1002,7 @@ class permission_add(baseldap.LDAPCreate):
|
||||
def post_callback(self, ldap, dn, entry, *keys, **options):
|
||||
try:
|
||||
self.obj.add_aci(entry)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
# Adding the ACI failed.
|
||||
# We want to be 100% sure the ACI is not there, so try to
|
||||
# remove it. (This is a no-op if the ACI was not added.)
|
||||
@@ -1185,7 +1185,7 @@ class permission_mod(baseldap.LDAPUpdate):
|
||||
context.permision_moving_aci = True
|
||||
try:
|
||||
context.old_aci_info = self.obj.remove_aci(old_entry)
|
||||
except errors.NotFound, e:
|
||||
except errors.NotFound as e:
|
||||
self.log.error('permission ACI not found: %s' % e)
|
||||
|
||||
# To pass data to postcallback, we currently need to use the context
|
||||
|
||||
Reference in New Issue
Block a user