Skip to content
Snippets Groups Projects
Commit 09b68e9b authored by Bryan Tong Minh's avatar Bryan Tong Minh
Browse files

Bug 2690034: Fix revision iteration

parent 4b384e10
No related branches found
No related tags found
Loading
......@@ -9,6 +9,7 @@ Mwclient 0.6.4 is unreleased.
* Properly fix detection of alpha versions
* Added support for builtin json library
* Handle badtoken once
* Bug 2690034: Fix revision iteration
== Changes in version 0.6.3 ==
* Added domain parameter to login.
......
......@@ -266,7 +266,7 @@ class Page(object):
kwargs['rvprop'] = prop
if expandtemplates: kwargs['rvexpandtemplates'] = '1'
return listing.PageProperty(self, 'revisions', 'rv', limit = limit, **kwargs)
return RevisionsIterator(self, 'revisions', 'rv', limit = limit, **kwargs)
def templates(self, namespace = None, generator = True):
self.site.require(1, 8)
kwargs = dict(listing.List.generate_kwargs('tl', namespace = namespace))
......@@ -313,3 +313,9 @@ class Image(Page):
def __repr__(self):
return "<Image object '%s' for %s>" % (self.name.encode('utf-8'), self.site)
class RevisionsIterator(listing.PageProperty):
def load_chunk(self):
if 'rvstartid' in self.args and 'rvstart' in self.args:
del self.args['rvstart']
return listing.PageProperty.load_chunk(self)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment