Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions PIconnect/PI.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ class PIServer:
username : str, optional
Username to connect to the server, defaults to None
password : str, optional
Password for the username, defaults to None
Password for the username, defaults to None. When a username is specified a
password must be passed in as well, but it can be empty.
domain : str, optional
Domain of the username, defaults to None
authentication_mode : AuthenticationMode, optional
Expand Down Expand Up @@ -295,7 +296,7 @@ def __init__(
)
self.connection = default_server

if bool(username) != bool(password):
if (username is not None) != (password is not None):
raise ValueError(
"When passing credentials both the username and password must be specified."
)
Expand Down
Loading
Loading