improved login prompt
This commit is contained in:
@@ -58,12 +58,13 @@ class CmdAsana:
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
(url, state) = self.client.session.authorization_url()
|
(url, state) = self.client.session.authorization_url()
|
||||||
|
print("Go to the following link and enter the code:")
|
||||||
|
print(url)
|
||||||
try:
|
try:
|
||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open(url)
|
webbrowser.open(url)
|
||||||
except Exception:
|
except Exception:
|
||||||
print("Go to the following link and enter the code:")
|
pass
|
||||||
print(url)
|
|
||||||
|
|
||||||
code = sys.stdin.readline().strip()
|
code = sys.stdin.readline().strip()
|
||||||
token = self.client.session.fetch_token(code=code)
|
token = self.client.session.fetch_token(code=code)
|
||||||
|
|||||||
Reference in New Issue
Block a user