diff --git a/ipalib/rpc.py b/ipalib/rpc.py index 1ef0f5e95..b07435e95 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -1170,11 +1170,11 @@ class RPCClient(Connectible): try: principal = getattr(context, 'principal', None) delete_persistent_client_session_data(principal) - except Exception as e: + except Exception as e2: # This shouldn't happen if we have a session # but it isn't fatal. logger.debug("Error trying to remove persisent " - "session data: %s", e) + "session data: %s", e2) # Create a new serverproxy with the non-session URI serverproxy = self.create_connection( diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py index f40858e27..10ef89a82 100644 --- a/ipapython/ipaldap.py +++ b/ipapython/ipaldap.py @@ -1567,9 +1567,9 @@ class LDAPClient: str(base_dn), scope, filter, attrs_list, serverctrls=sctrls, timeout=time_limit, sizelimit=size_limit) - except ldap.LDAPError as e: + except ldap.LDAPError as e2: logger.warning( - "Error cancelling paged search: %s", e) + "Error cancelling paged search: %s", e2) cookie = '' try: