improved login prompt

This commit is contained in:
2015-08-06 21:25:49 -07:00
parent eb11f2933b
commit 3894b81ebc

View File

@@ -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)