Revision: 7722 Author: russblau Date: 2009-11-30 21:32:22 +0000 (Mon, 30 Nov 2009)
Log Message: ----------- Make sure all generator calls have an explicit "site" parameter
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2009-11-30 19:00:26 UTC (rev 7721) +++ branches/rewrite/pywikibot/site.py 2009-11-30 21:32:22 UTC (rev 7722) @@ -810,7 +810,8 @@ def mediawiki_message(self, key): """Return the MediaWiki message text for key "key" """ if not key in self._msgcache: - msg_query = api.QueryGenerator(meta="allmessages", amfilter=key) + msg_query = api.QueryGenerator(site=self, meta="allmessages", + amfilter=key) for msg in msg_query: if msg['name'] == key and not 'missing' in msg: self._msgcache[key] = msg['*'] @@ -1097,7 +1098,7 @@ props += '|templates' if langlinks: props += '|langlinks' - rvgen = api.PropertyGenerator(props) + rvgen = api.PropertyGenerator(props, site=self) rvgen.set_maximum_items(-1) # suppress use of "rvlimit" parameter if len(pageids) == len(sublist): # only use pageids if all pages have them
pywikipedia-svn@lists.wikimedia.org