Revision: 5588 Author: russblau Date: 2008-06-17 21:47:08 +0000 (Tue, 17 Jun 2008)
Log Message: ----------- fix type bug
Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2008-06-17 16:44:20 UTC (rev 5587) +++ branches/rewrite/pywikibot/data/api.py 2008-06-17 21:47:08 UTC (rev 5588) @@ -363,14 +363,17 @@ logger.debug(self.data) return pagedata = self.data["query"][self.resultkey] - logger.debug("%s received %s; limit=%s" + if isinstance(pagedata, dict): + logger.debug("%s received %s; limit=%s" % (self.__class__.__name__, pagedata.keys(), self.limit)) - if isinstance(pagedata, dict): pagedata = pagedata.values() # for generators, this yields the pages in order of # their pageids, not their titles.... FIXME? - + else: + logger.debug("%s received %s; limit=%s" + % (self.__class__.__name__, pagedata, + self.limit)) for item in pagedata: yield self.result(item) count += 1