Commit 78a86a92 authored by mver-al's avatar mver-al Committed by oroulet

Allow setting password to None.

parent af95fff1
...@@ -143,12 +143,12 @@ class Client: ...@@ -143,12 +143,12 @@ class Client:
""" """
self._username = username self._username = username
def set_password(self, pwd: str) -> None: def set_password(self, pwd: str | None) -> None:
""" """
Set user password for the connection. Set user password for the connection.
initial password from the URL will be overwritten initial password from the URL will be overwritten
""" """
if not isinstance(pwd, str): if pwd is not None and not isinstance(pwd, str):
raise TypeError(f"Password must be a string, got {pwd} of type {type(pwd)}") raise TypeError(f"Password must be a string, got {pwd} of type {type(pwd)}")
self._password = pwd self._password = pwd
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment