Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-13 00:15:18 +02:00
parent 0f17891cd4
commit fb13885543

View File

@ -3,6 +3,7 @@
import pydrive2
from pydrive2.auth import GoogleAuth
import logging
import os
def add_parsers(subparsers):
@ -49,6 +50,9 @@ def auth():
if user_input.lower() in ('y', 'yes'):
try:
gauth = GoogleAuth(settings_file="settings.yaml")
if not os.path.exists("/root/client_secrets.json"):
logging.error("client_secrets.json not found in /root. Please RTFM!")
return 0
print(gauth.GetAuthUrl())
user_input = input("Please copy this URL into a browser, "
"complete the verification and then copy/paste the code from addressbar.")