summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-09-03 18:35:21 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-09-03 18:39:07 +0200
commitc08c913b82bf7421600b248d055db497d627802a (patch)
tree4215bc66bc490970e39d1755b3b541876598f128 /gitlab
parent29e2efeae22ce5fa82e3541360b234e0053a65c2 (diff)
downloadgitlab-c08c913b82bf7421600b248d055db497d627802a.tar.gz
Fix and test pagination
Fixes #140
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 5f72d0d..cbe90e3 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -365,14 +365,14 @@ class Gitlab(object):
get_all_results = kwargs.get('all', False)
+ r = self._raw_get(path, **params)
+ raise_error_from_response(r, GitlabListError)
+
# Remove parameters from kwargs before passing it to constructor
for key in ['all', 'page', 'per_page', 'sudo', 'next_url']:
if key in params:
del params[key]
- r = self._raw_get(path, **params)
- raise_error_from_response(r, GitlabListError)
-
# Add _from_api manually, because we are not creating objects
# through normal path
params['_from_api'] = True