Replace StandardError with Exception

StandardError was removed in Python3 and instead
Exception should be used.

Signed-off-by: Robert Kuska <rkuska@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Robert Kuska
2015-08-24 12:40:33 +02:00
committed by Jan Cholasta
parent 34e6c3ea05
commit 01da4a8de3
21 changed files with 49 additions and 49 deletions

View File

@@ -31,7 +31,7 @@ from ipalib.plugins.user import NO_UPG_MAGIC
if api.env.in_server and api.env.context in ['lite', 'server']:
try:
from ipaserver.plugins.ldap2 import ldap2
except StandardError as e:
except Exception as e:
raise e
from ipalib import _
from ipapython.dn import DN
@@ -922,7 +922,7 @@ can use their Kerberos accounts.''')
ds_base_dn = DN(entries[0]['namingcontexts'][0])
assert isinstance(ds_base_dn, DN)
except (IndexError, KeyError) as e:
raise StandardError(str(e))
raise Exception(str(e))
# migrate!
(migrated, failed) = self.migrate(