Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-13 15:22:07 +02:00
parent 9b5fc8a9b3
commit b6b365d624

View File

@ -50,6 +50,7 @@ class GdriveSync(plugins.Plugin):
if not os.path.exists("/root/.gdrive-backup"):
self.backup = False
try:
gauth = GoogleAuth(settings_file="/root/settings.yaml")
gauth.LoadCredentialsFile("/root/credentials.json")
if gauth.credentials is None:
@ -113,6 +114,9 @@ class GdriveSync(plugins.Plugin):
# all set, gdriveSync is ready to run
self.ready = True
logging.info("[gdrivesync] loaded")
except Exception as e:
logging.error(f"Error: {e}")
self.ready = False
def on_unload(self, ui):
logging.info("[gdrivesync] unloaded")