diff options
| author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-12-24 08:27:54 +0100 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-12-24 08:27:54 +0100 |
| commit | 5d88f68ddadddf98c42940a713817487058f8c17 (patch) | |
| tree | 1f6a81dde565fffbf797e5df6f952d6c315ca293 /gitlab | |
| parent | acc151190e32ddaf9198a10c5b816af2d36c0f19 (diff) | |
| download | gitlab-5d88f68ddadddf98c42940a713817487058f8c17.tar.gz | |
Sanitize the id used to construct URLs
Closes #28
Diffstat (limited to 'gitlab')
| -rw-r--r-- | gitlab/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 2fbe2fa..236fc8d 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -381,7 +381,9 @@ class Gitlab(object): raise GitlabGetError('Missing attribute(s): %s' % ", ".join(missing)) - url = self._construct_url(id_=id, obj=obj_class, parameters=kwargs) + sanitized_id = _sanitize(id) + url = self._construct_url(id_=sanitized_id, obj=obj_class, + parameters=kwargs) headers = self._create_headers() # Remove attributes that are used in url so that there is only |
