From 3894b81ebc450edb650d88c49e14f4961968fdfa Mon Sep 17 00:00:00 2001 From: Aaron Gutierrez Date: Thu, 6 Aug 2015 21:25:49 -0700 Subject: [PATCH] improved login prompt --- cmdasana.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)