mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -50,6 +50,7 @@ class GdriveSync(plugins.Plugin):
|
|||||||
if not os.path.exists("/root/.gdrive-backup"):
|
if not os.path.exists("/root/.gdrive-backup"):
|
||||||
self.backup = False
|
self.backup = False
|
||||||
|
|
||||||
|
try:
|
||||||
gauth = GoogleAuth(settings_file="/root/settings.yaml")
|
gauth = GoogleAuth(settings_file="/root/settings.yaml")
|
||||||
gauth.LoadCredentialsFile("/root/credentials.json")
|
gauth.LoadCredentialsFile("/root/credentials.json")
|
||||||
if gauth.credentials is None:
|
if gauth.credentials is None:
|
||||||
@ -113,6 +114,9 @@ class GdriveSync(plugins.Plugin):
|
|||||||
# all set, gdriveSync is ready to run
|
# all set, gdriveSync is ready to run
|
||||||
self.ready = True
|
self.ready = True
|
||||||
logging.info("[gdrivesync] loaded")
|
logging.info("[gdrivesync] loaded")
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"Error: {e}")
|
||||||
|
self.ready = False
|
||||||
|
|
||||||
def on_unload(self, ui):
|
def on_unload(self, ui):
|
||||||
logging.info("[gdrivesync] unloaded")
|
logging.info("[gdrivesync] unloaded")
|
||||||
|
Reference in New Issue
Block a user