Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole00 committed May 24, 2024
1 parent 982a7e5 commit 59ee7e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion nebula3/gclient/net/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions nebula3/gclient/net/SessionPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down

0 comments on commit 59ee7e4

Please sign in to comment.