From 82e1835869d1e0c50736ec318169f48dd072db3d Mon Sep 17 00:00:00 2001 From: Adam Taylor Date: Thu, 14 Dec 2023 19:14:47 +0000 Subject: [PATCH] Update synlogin --- monitor.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/monitor.py b/monitor.py index 3a3ee7b..c7e1db5 100644 --- a/monitor.py +++ b/monitor.py @@ -4,6 +4,7 @@ from synapseclient import EntityViewSchema, EntityViewType, Synapse import sys +import os fileview = sys.argv[1] webhook_url = sys.argv[2] @@ -19,17 +20,12 @@ def synapse_login(synapse_config=synapseclient.client.CONFIG_FILE): Synapse connection """ try: - syn = synapseclient.Synapse(skip_checks=True, configPath=synapse_config) + syn = synapseclient.Synapse(skip_checks=True) if os.getenv("SCHEDULED_JOB_SECRETS") is not None: secrets = json.loads(os.getenv("SCHEDULED_JOB_SECRETS")) syn.login(silent=True, authToken=secrets["SYNAPSE_AUTH_TOKEN"]) else: syn.login(silent=True) - except (SynapseNoCredentialsError, SynapseAuthenticationError): - raise ValueError( - "Login error: please make sure you have correctly " - "configured your client." - ) return syn