From bb9cab3e916a3d67aa2d59d00cc2c1f7f2bfeab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk> Date: Mon, 23 Jan 2023 18:22:48 +0000 Subject: [PATCH] change(omero): add assertion for invalid creds --- src/aliby/io/omero.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/aliby/io/omero.py b/src/aliby/io/omero.py index a455af09..e7205a04 100644 --- a/src/aliby/io/omero.py +++ b/src/aliby/io/omero.py @@ -39,9 +39,9 @@ class BridgeOmero: def __init__( self, - host="islay.bio.ed.ac.uk", - username="upload", - password="***REMOVED***", + host=None, + username=None, + password=None, ): """ Parameters @@ -51,6 +51,11 @@ class BridgeOmero: username: string password : string """ + # assert all((host, username, password)), str(f"Invalid credentials host:{host}, user:{username}, pass:{pass}") + assert all( + (host, username, password) + ), f"Invalid credentials. host: {host}, user: {username}, pwd: {password}" + self.conn = None self.host = host self.username = username -- GitLab