http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9734
Revision: 9734 Author: valhallasw Date: 2011-11-09 22:17:11 +0000 (Wed, 09 Nov 2011) Log Message: ----------- Fix: always add primary namespace, or normalisation (e.g. File->Image for older mediawiki sites) will fail.
Modified Paths: -------------- trunk/pywikipedia/generate_family_file.py
Modified: trunk/pywikipedia/generate_family_file.py =================================================================== --- trunk/pywikipedia/generate_family_file.py 2011-11-08 16:38:46 UTC (rev 9733) +++ trunk/pywikipedia/generate_family_file.py 2011-11-09 22:17:11 UTC (rev 9734) @@ -206,7 +206,7 @@ if ns == 0: # never translate the article namespace return try: - if translation not in self.f.namespace(lang, ns, all=True): # self.f.namespace might return KeyError itself + if translation != self.f.namespace(lang, ns): # self.f.namespace might return KeyError itself raise KeyError except KeyError: self._store(ns, lang, translation)