Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-13 09:21:08 +02:00
parent fd75e12d8a
commit 0ac2524d3e

View File

@ -86,14 +86,15 @@ def refresh():
except pydrive2.auth.RefreshError: except pydrive2.auth.RefreshError:
print(gauth.GetAuthUrl()) print(gauth.GetAuthUrl())
user_input = input("Please copy this URL into a browser, " user_input = input("Please copy this URL into a browser, "
"complete the verification and then copy/paste the code from addressbar.") "complete the verification and then copy/paste the code from addressbar.\n\n"
"Code: ")
gauth.Auth(user_input) gauth.Auth(user_input)
else: else:
print(gauth.GetAuthUrl()) print(gauth.GetAuthUrl())
user_input = input("Please copy this URL into a browser, " user_input = input("Please copy this URL into a browser, "
"complete the verification and then copy/paste the code from addressbar.") "complete the verification and then copy/paste the code from addressbar.\n\n"
"Code: ")
gauth.Auth(user_input) gauth.Auth(user_input)
gauth.Authorize() gauth.Authorize()
gauth.SaveCredentialsFile("credentials.json")
print("No refresh is required.") print("No refresh is required.")
return 0 return 0