Commit c033b7ea466c4e50690a3ed11ef3f8489e41cd93
Committed by
Gust
1 parent
2b5c4604
Exists in
master
and in
12 other branches
Fixed? urljoin problem
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
colab/proxy/gitlab/data_api.py
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | import json | 2 | import json |
| 3 | import urllib | 3 | import urllib |
| 4 | import urllib2 | 4 | import urllib2 |
| 5 | -import urlparse | ||
| 6 | 5 | ||
| 7 | from dateutil.parser import parse | 6 | from dateutil.parser import parse |
| 8 | 7 | ||
| @@ -22,8 +21,10 @@ class GitlabDataAPI(ProxyDataAPI): | @@ -22,8 +21,10 @@ class GitlabDataAPI(ProxyDataAPI): | ||
| 22 | kwargs['private_token'] = proxy_config.get('private_token') | 21 | kwargs['private_token'] = proxy_config.get('private_token') |
| 23 | params = urllib.urlencode(kwargs) | 22 | params = urllib.urlencode(kwargs) |
| 24 | 23 | ||
| 25 | - url = u'{}?{}'.format(path, params) | ||
| 26 | - return urlparse.urljoin(upstream, url) | 24 | + if upstream[-1] == '/': |
| 25 | + upstream = upstream[:-1] | ||
| 26 | + | ||
| 27 | + return u'{}{}?{}'.format(upstream, path, params) | ||
| 27 | 28 | ||
| 28 | def fetchProjects(self): | 29 | def fetchProjects(self): |
| 29 | page = 1 | 30 | page = 1 |