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
@@ -46,7 +46,7 @@ def use_keytab(principal, keytab):
|
||||
conn.connect(autobind=ipaldap.AUTOBIND_DISABLED)
|
||||
conn.disconnect()
|
||||
except gssapi.exceptions.GSSError as e:
|
||||
raise StandardError('Unable to bind to LDAP. Error initializing principal %s in %s: %s' % (principal, keytab, str(e)))
|
||||
raise Exception('Unable to bind to LDAP. Error initializing principal %s in %s: %s' % (principal, keytab, str(e)))
|
||||
finally:
|
||||
os.environ.pop('KRB5CCNAME', None)
|
||||
if tmpdir:
|
||||
@@ -138,7 +138,7 @@ class test_ipagetkeytab(cmdline_test):
|
||||
"""
|
||||
try:
|
||||
use_keytab(self.service_princ, self.keytabname)
|
||||
except StandardError as errmsg:
|
||||
except Exception as errmsg:
|
||||
assert('Unable to bind to LDAP. Error initializing principal' in str(errmsg))
|
||||
|
||||
def test_9_cleanup(self):
|
||||
|
||||
Reference in New Issue
Block a user