Skip to content

Commit 39e5c34

Browse files
committed
fix host trailing slash
1 parent f0c4da4 commit 39e5c34

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitlab3/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ class GitLab(_GitLabAPI):
448448

449449
def __init__(self, gitlab_url, token=None, convert_dates=True,
450450
ssl_verify=True, ssl_cert=None):
451+
if gitlab_url[-1:] == '/':
452+
gitlab_url = gitlab_url[:-1]
451453
setattr(_GitLabAPI, '_base_url', gitlab_url + "/api/v3")
452454
setattr(_GitLabAPI, '_headers', {'PRIVATE-TOKEN': token})
453455
setattr(_GitLabAPI, '_convert_dates_enabled', convert_dates)

0 commit comments

Comments
 (0)