From 70e8a46a439c4252d090ef04b98835b478a9719a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 15 Oct 2023 19:52:55 +0200 Subject: [PATCH] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/gdrivesync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/plugins/default/gdrivesync.py b/pwnagotchi/plugins/default/gdrivesync.py index 0e661a81..50c25737 100644 --- a/pwnagotchi/plugins/default/gdrivesync.py +++ b/pwnagotchi/plugins/default/gdrivesync.py @@ -227,11 +227,11 @@ class GdriveSync(plugins.Plugin): except Exception as e: logging.error(f"[gDriveSync] Error during upload_to_gdrive: {e}") - def handle_upload_error(self, api_error, backup_path, gdrive_folder, root_folder_id, pwnagotchi_folder_id): + def handle_upload_error(self, api_error, backup_path, gdrive_folder): if 'Rate Limit Exceeded' in str(api_error): logging.warning("[gDriveSync] Rate limit exceeded. Waiting for some time before retrying...") # We set to 100 seconds, because there is a limit 20k requests per 100s per user time.sleep(100) # You can adjust the sleep duration based on your needs - self.upload_to_gdrive(backup_path, gdrive_folder, root_folder_id, pwnagotchi_folder_id) + self.upload_to_gdrive(backup_path, gdrive_folder) else: logging.error(f"[gDriveSync] API Request Error: {api_error}")