http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11257
Revision: 11257 Author: legoktm Date: 2013-03-25 07:16:29 +0000 (Mon, 25 Mar 2013) Log Message: ----------- Use site.has_right which is cached
Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2013-03-25 04:19:16 UTC (rev 11256) +++ branches/rewrite/pywikibot/data/api.py 2013-03-25 07:16:29 UTC (rev 11257) @@ -584,8 +584,7 @@ for param in self._modules[mod].get("parameters", []): if param["name"] == "limit": if (self.site.logged_in() - and "apihighlimits" in - self.site.getuserinfo()["rights"]): + and self.site.has_right('apihighlimits')): self.api_limit = int(param["highmax"]) else: self.api_limit = int(param["max"])
pywikipedia-svn@lists.wikimedia.org