Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-13 09:34:11 +02:00
parent 7179ca6652
commit 4cc17b0894

View File

@ -76,6 +76,7 @@ def refresh():
try:
# Refresh the token
gauth.Refresh()
print("Succesfully refresh access token ..")
except pydrive2.auth.RefreshError:
print(gauth.GetAuthUrl())
user_input = input("Please copy this URL into a browser, "
@ -96,5 +97,5 @@ def refresh():
gauth.Auth(user_input)
gauth.SaveCredentialsFile("/root/credentials.json")
gauth.Authorize()
print("Succesfully refresh access token ..")
print("No refresh required ..")
return 0