From 1c33c830d5aa4b593b595ec314944ba21cfc59a9 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 13 Oct 2023 00:16:17 +0200 Subject: [PATCH] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/google/cmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/google/cmd.py b/pwnagotchi/google/cmd.py index 2122badc..ec2c8fa7 100644 --- a/pwnagotchi/google/cmd.py +++ b/pwnagotchi/google/cmd.py @@ -48,11 +48,11 @@ def auth(): "No one else but you have access to these.\n" "Do you agree? \n\n[y(es)/n(o)]") if user_input.lower() in ('y', 'yes'): + if not os.path.exists("/root/client_secrets.json"): + logging.error("client_secrets.json not found in /root. Please RTFM!") + return 0 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.")