From 59ee7e4212f272c39c5b848eb5d0aabbe2af723b Mon Sep 17 00:00:00 2001 From: Anqi Date: Fri, 24 May 2024 11:55:31 +0800 Subject: [PATCH] fmt --- nebula3/gclient/net/Connection.py | 1 - nebula3/gclient/net/SessionPool.py | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nebula3/gclient/net/Connection.py b/nebula3/gclient/net/Connection.py index 03c58a78..a8eaa8e8 100644 --- a/nebula3/gclient/net/Connection.py +++ b/nebula3/gclient/net/Connection.py @@ -161,7 +161,6 @@ def _reopen(self): self._ip, self._port, self._timeout, self.use_http2, self.http_headers ) - def authenticate(self, user_name, password): """authenticate to graphd diff --git a/nebula3/gclient/net/SessionPool.py b/nebula3/gclient/net/SessionPool.py index 7216e681..8173b057 100644 --- a/nebula3/gclient/net/SessionPool.py +++ b/nebula3/gclient/net/SessionPool.py @@ -426,7 +426,11 @@ def _new_session(self): except Exception: session.release() connection.close() - raise RuntimeError("Failed to get session, execute `use {}` failed.".format(self._space_name)) + raise RuntimeError( + "Failed to get session, execute `use {}` failed.".format( + self._space_name + ) + ) if not resp.is_succeeded(): session.release() connection.close() @@ -439,7 +443,7 @@ def _new_session(self): except AuthFailedException as e: # if auth failed because of credentials, close the pool if e.message.find("Invalid password") or e.message.find( - "User not exist" + "User not exist" ): logger.error( "Authentication failed, because of bad credentials, close the pool {}".format(