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
@@ -442,7 +442,7 @@ class DNSKeySyncInstance(service.Service):
|
||||
self.admin_conn.modify_s(dns_group, mod)
|
||||
except ldap.TYPE_OR_VALUE_EXISTS:
|
||||
pass
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
self.logger.critical("Could not modify principal's %s entry: %s"
|
||||
% (dnssynckey_principal_dn, str(e)))
|
||||
raise
|
||||
@@ -456,7 +456,7 @@ class DNSKeySyncInstance(service.Service):
|
||||
(ldap.MOD_REPLACE, 'nsLookThroughLimit', '-1')]
|
||||
try:
|
||||
self.admin_conn.modify_s(dnssynckey_principal_dn, mod)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
self.logger.critical("Could not set principal's %s LDAP limits: %s"
|
||||
% (dnssynckey_principal_dn, str(e)))
|
||||
raise
|
||||
@@ -485,7 +485,7 @@ class DNSKeySyncInstance(service.Service):
|
||||
for f in [paths.SYSCONFIG_NAMED]:
|
||||
try:
|
||||
self.fstore.restore_file(f)
|
||||
except ValueError, error:
|
||||
except ValueError as error:
|
||||
self.logger.debug(error)
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user