diff --git a/src/mednet/scripts/upload.py b/src/mednet/scripts/upload.py index ec2ba7b27b2478adcf36dfdc2e19f9bd8f25f62b..bed4802f8863ef4bc1d445b56f3c0c2d45fb623d 100644 --- a/src/mednet/scripts/upload.py +++ b/src/mednet/scripts/upload.py @@ -32,14 +32,8 @@ def _get_gitlab_config(): token = input(f"{server} (user or project) token: ") gl = gitlab.Gitlab(server, private_token=token, api_version="4") config = {"idiap": {"private_token": token}} - # try to authenticate with given credential. - try: - gl.auth() - except: - logger.error("Gitlab credential issue, authentication failed.") - raise RuntimeError( - f"There is a Gitlab credential issue that must be fixed before uploading." - ) + # test authentication with given credential. + gl.auth() return gl, config