http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10377
Revision: 10377 Author: xqt Date: 2012-06-19 13:13:26 +0000 (Tue, 19 Jun 2012) Log Message: ----------- update default namespaces for mw >= 1.14
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2012-06-19 11:07:32 UTC (rev 10376) +++ branches/rewrite/pywikibot/site.py 2012-06-19 13:13:26 UTC (rev 10377) @@ -652,6 +652,9 @@ 14: [u"Category"], 15: [u"Category talk"], } + if self.family.versionnumber(self.code) >= 14: + self._namespaces[6] = [u"File"] + self._namespaces[7] = [u"File talk"] self.sitelock = threading.Lock() self._msgcache = {} self._loginstatus = LoginStatus.NOT_ATTEMPTED
pywikipedia-svn@lists.wikimedia.org