mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Jan Cholasta
parent
34e6c3ea05
commit
01da4a8de3
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user