Skip to content

Commit 4fc072a

Browse files
authored
Merge pull request #4 from samrocketman/bugfix/url_slash
fix host trailing slash
2 parents dca4754 + 39e5c34 commit 4fc072a

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)