summaryrefslogtreecommitdiff
path: root/gitlab/__init__.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-08-07 11:41:09 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-08-07 11:41:09 +0200
commit922041d1215dc00ecd633e4fc330fd991ad578bd (patch)
tree5509ae5da2a3cfd772a6d2bc599c1883fd18d4bf /gitlab/__init__.py
parent92edb9922b178783f9307c84147352ae31f32d0b (diff)
downloadgitlab-922041d1215dc00ecd633e4fc330fd991ad578bd.tar.gz
Fix the listing of some resources
The parent ID wasn't available in the generated objects, leading to exceptions when trying to use specific methods for these objects. Fixes #132
Diffstat (limited to 'gitlab/__init__.py')
-rw-r--r--gitlab/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 8d1212e..15a142c 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -323,11 +323,12 @@ class Gitlab(object):
raise GitlabConnectionError(
"Can't connect to GitLab server (%s)" % e)
- def _raw_list(self, path, cls, **kwargs):
+ def _raw_list(self, path, cls, extra_attrs={}, **kwargs):
r = self._raw_get(path, **kwargs)
raise_error_from_response(r, GitlabListError)
- cls_kwargs = kwargs.copy()
+ cls_kwargs = extra_attrs.copy()
+ cls_kwargs.update(kwargs.copy())
# Add _from_api manually, because we are not creating objects
# through normal path