mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-13 17:02:02 -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:
1 parent
a651be3eec
commit
27dabb4528
118 files changed
+661
-661
No files matched your search
@@ -112,7 +112,7 @@ class ipaserver:
|
||||
self.domain = lrealms[0].lower()
|
||||
return True
|
||||
|
||||
except LDAPError, err:
|
||||
except LDAPError as err:
|
||||
#no good
|
||||
root_logger.error("Ldap Error: "+str(err))
|
||||
return False
|
||||
@@ -289,7 +289,7 @@ def main():
|
||||
{'name':'empty', 'type':'empty'}]
|
||||
try:
|
||||
ldapconf.newConf("/etc/ldap.conf", opts)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
print "Configuration failed: " + str(e)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ class IPAChangeConf:
|
||||
try:
|
||||
try:
|
||||
shutil.copy2(file, file+".ipabkp")
|
||||
except IOError, err:
|
||||
except IOError as err:
|
||||
if err.errno == 2:
|
||||
# The orign file did not exist
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user