Skip to content

Commit

Permalink
When --page-size valued with 0 or -1, pagination will be disabled.
Browse files Browse the repository at this point in the history
JIRA: PDC-1636
  • Loading branch information
bliuredhat committed Aug 3, 2016
1 parent 92eb50c commit a6ee4f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pdc_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ def get_paged(self, res, **kwargs):
if self.page_size:
kwargs['page_size'] = self.page_size

if self.page_size in [0, -1]:
# If page-size is 0 or -1, pagination will be disable.
kwargs['page_size'] = self.page_size
return res(**kwargs)

def worker():
kwargs['page'] = 1
while True:
Expand Down

0 comments on commit a6ee4f6

Please sign in to comment.