Skip to content

Commit

Permalink
fix(auth): add test hints for missing browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
mwfarb committed Sep 1, 2023
1 parent 0f7a4dc commit 7187cca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arena/auth.py
Expand Up @@ -81,9 +81,11 @@ def authenticate_user(self, web_host):
# test for valid browser before starting browser-required auth-flow
webbrowser.get()
except (webbrowser.Error) as err:
print("Console-only configured OS detected. {0} ".format(err))
print(f"Console-only configured OS detected. {err} ")
print("You will need to configure your environment to launch a web browser window, to complete the authentication flow.")
return None
print("The following command should open a browser when you have the browser configured:")
print(" python -m webbrowser 'https://example.org'")
raise err

# automated browser flow for local client
flow = InstalledAppFlow.from_client_config(
Expand Down

0 comments on commit 7187cca

Please sign in to comment.