Skip to content

Commit 79be606

Browse files
committed
update
1 parent 064eb79 commit 79be606

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mergin/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __init__(
146146
self.opener = urllib.request.build_opener(*handlers, https_handler)
147147
urllib.request.install_opener(self.opener)
148148

149-
if self._login_type == LoginType.PASSWORD:
149+
if login or password:
150150
if login and not password:
151151
raise ClientError("Unable to log in: no password provided for '{}'".format(login))
152152
if password and not login:
@@ -157,9 +157,9 @@ def __init__(
157157
if not self._auth_session:
158158
self.login(login, password)
159159

160-
elif self._login_type == LoginType.SSO:
160+
else:
161161
if not self._auth_session:
162-
raise ClientError("Unable to log in: no auth token provided for SSO login")
162+
raise ClientError("Unable to log in: no auth token provided for login")
163163

164164
def setup_logging(self):
165165
"""Setup Mergin Maps client logging."""

0 commit comments

Comments
 (0)