Revision: 6041 Author: nicdumz Date: 2008-10-29 04:24:40 +0000 (Wed, 29 Oct 2008)
Log Message: ----------- yes, query-continue can return ints ... but sometimes also some non-ascii characters :)
Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2008-10-28 22:15:22 UTC (rev 6040) +++ branches/rewrite/pywikibot/data/api.py 2008-10-29 04:24:40 UTC (rev 6041) @@ -409,8 +409,11 @@ raise Error("Missing '%s' key in ['query-continue'] value." % self.module) update = self.data["query-continue"][self.module] - for key in update: - self.request[key] = str(update[key]) + for key, value in update.iteritems(): + # query-continue can return ints + if isinstance(value, int): + value = str(value) + self.request[key] = value
def result(self, data): """Process result data as needed for particular subclass."""
pywikipedia-l@lists.wikimedia.org