mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06: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:
committed by
Tomas Babej
parent
a651be3eec
commit
27dabb4528
@@ -90,10 +90,10 @@ while watcher_running:
|
||||
try:
|
||||
log.info('LDAP bind...')
|
||||
ldap_connection.sasl_interactive_bind_s("", ipaldap.SASL_GSSAPI)
|
||||
except ldap.INVALID_CREDENTIALS, e:
|
||||
except ldap.INVALID_CREDENTIALS as e:
|
||||
log.exception('Login to LDAP server failed: %s', e)
|
||||
sys.exit(1)
|
||||
except ldap.SERVER_DOWN, e:
|
||||
except ldap.SERVER_DOWN as e:
|
||||
log.exception('LDAP server is down, going to retry: %s', e)
|
||||
time.sleep(5)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user