Skip to content
Snippets Groups Projects
Commit 095a72e9 authored by Gokhan OZBULAK's avatar Gokhan OZBULAK
Browse files

Remove try/catch block for auth, no need it #60.

parent d7b67bb6
No related branches found
No related tags found
No related merge requests found
Pipeline #86382 failed
...@@ -32,14 +32,8 @@ def _get_gitlab_config(): ...@@ -32,14 +32,8 @@ def _get_gitlab_config():
token = input(f"{server} (user or project) token: ") token = input(f"{server} (user or project) token: ")
gl = gitlab.Gitlab(server, private_token=token, api_version="4") gl = gitlab.Gitlab(server, private_token=token, api_version="4")
config = {"idiap": {"private_token": token}} config = {"idiap": {"private_token": token}}
# try to authenticate with given credential. # test authentication with given credential.
try: gl.auth()
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."
)
return gl, config return gl, config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment