From 27dabb45282911e375336f75934af9dd6cc5d963 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 30 Jul 2015 16:49:29 +0200 Subject: Modernize 'except' clauses The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej --- ipaserver/install/dnskeysyncinstance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipaserver/install/dnskeysyncinstance.py') diff --git a/ipaserver/install/dnskeysyncinstance.py b/ipaserver/install/dnskeysyncinstance.py index f593b7134..2036a56be 100644 --- a/ipaserver/install/dnskeysyncinstance.py +++ b/ipaserver/install/dnskeysyncinstance.py @@ -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 -- cgit