diff --git a/cmdasana.py b/cmdasana.py index 632214f..02ad2c9 100755 --- a/cmdasana.py +++ b/cmdasana.py @@ -58,12 +58,13 @@ class CmdAsana: }, ) (url, state) = self.client.session.authorization_url() + print("Go to the following link and enter the code:") + print(url) try: import webbrowser webbrowser.open(url) except Exception: - print("Go to the following link and enter the code:") - print(url) + pass code = sys.stdin.readline().strip() token = self.client.session.fetch_token(code=code)