mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix exception escape warning
W1661(exception-escape), RPCClient.forward] Using an exception object that was bound by an except handler) Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Rob Crittenden
parent
49f909c9d3
commit
24cc13db89
@@ -1170,11 +1170,11 @@ class RPCClient(Connectible):
|
|||||||
try:
|
try:
|
||||||
principal = getattr(context, 'principal', None)
|
principal = getattr(context, 'principal', None)
|
||||||
delete_persistent_client_session_data(principal)
|
delete_persistent_client_session_data(principal)
|
||||||
except Exception as e:
|
except Exception as e2:
|
||||||
# This shouldn't happen if we have a session
|
# This shouldn't happen if we have a session
|
||||||
# but it isn't fatal.
|
# but it isn't fatal.
|
||||||
logger.debug("Error trying to remove persisent "
|
logger.debug("Error trying to remove persisent "
|
||||||
"session data: %s", e)
|
"session data: %s", e2)
|
||||||
|
|
||||||
# Create a new serverproxy with the non-session URI
|
# Create a new serverproxy with the non-session URI
|
||||||
serverproxy = self.create_connection(
|
serverproxy = self.create_connection(
|
||||||
|
@@ -1567,9 +1567,9 @@ class LDAPClient:
|
|||||||
str(base_dn), scope, filter, attrs_list,
|
str(base_dn), scope, filter, attrs_list,
|
||||||
serverctrls=sctrls, timeout=time_limit,
|
serverctrls=sctrls, timeout=time_limit,
|
||||||
sizelimit=size_limit)
|
sizelimit=size_limit)
|
||||||
except ldap.LDAPError as e:
|
except ldap.LDAPError as e2:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Error cancelling paged search: %s", e)
|
"Error cancelling paged search: %s", e2)
|
||||||
cookie = ''
|
cookie = ''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user