comparison sat_pubsub/gateway.py @ 297:4115999d85e9

fixes behavior when maxItems is 0
author souliane <souliane@mailoo.org>
date Thu, 10 Sep 2015 15:03:12 +0200
parents 002c59dbc23f
children a776544d84e5
comparison
equal deleted inserted replaced
296:6ce33757d21e 297:4115999d85e9
891 return f.deferred 891 return f.deferred
892 892
893 893
894 def items(self, xmppURI, maxItems=None): 894 def items(self, xmppURI, maxItems=None):
895 query = {'uri': xmppURI} 895 query = {'uri': xmppURI}
896 if maxItems: 896 if maxItems is not None:
897 query['max_items'] = int(maxItems) 897 query['max_items'] = int(maxItems)
898 f = getPageWithFactory(self._makeURI('items', query), 898 f = getPageWithFactory(self._makeURI('items', query),
899 method='GET', 899 method='GET',
900 agent=self.agent) 900 agent=self.agent)
901 return f.deferred 901 return f.deferred