Skip to content

Commit

Permalink
Improve message for user when falling back to device-code login (#199)
Browse files Browse the repository at this point in the history
* Remove error message for user when finding chromium lockfile and falling back to device-code login
  • Loading branch information
roywilly authored Apr 19, 2024
1 parent 0ecdfe4 commit c90b840
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/sumo/wrapper/_auth_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def login(self):
print(
"\n\n \033[31m NOTE! \033[0m"
+ " Please login to Equinor Azure to enable Sumo access: "
+ "we opened a login web-page for you in your browser."
+ "we are opening a login web-page for you in your browser."
+ "\nYou should complete your login within "
+ str(self._login_timeout_minutes)
+ " minutes, "
Expand Down Expand Up @@ -422,11 +422,6 @@ def get_auth_provider(
Path(lockfile_path).resolve()
).__contains__(platform.node()):
# https://github.com/equinor/sumo-wrapper-python/issues/193
print(
"Chromium lockfile points to another host, "
f"you should delete {lockfile_path}. "
"Falling back to device-code login now"
)
return AuthProviderDeviceCode(client_id, authority, resource_id)
# ELSE
return AuthProviderInteractive(client_id, authority, resource_id)

0 comments on commit c90b840

Please sign in to comment.