[Pywikipedia-l] SVN: [4686] trunk/pywikipedia/cosmetic_changes.py
rotem at svn.wikimedia.org
rotem at svn.wikimedia.org
Mon Dec 10 12:09:33 UTC 2007
Revision: 4686
Author: rotem
Date: 2007-12-10 12:09:27 +0000 (Mon, 10 Dec 2007)
Log Message:
-----------
Only check namespaces that are *defined* for this language.
Modified Paths:
--------------
trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py
===================================================================
--- trunk/pywikipedia/cosmetic_changes.py 2007-12-10 07:39:14 UTC (rev 4685)
+++ trunk/pywikipedia/cosmetic_changes.py 2007-12-10 12:09:27 UTC (rev 4686)
@@ -144,6 +144,9 @@
exceptions = ['nowiki', 'comment', 'math', 'pre']
for nsNumber in family.namespaces:
+ if not family.isDefinedNSLanguage(self.site.lang, nsNumber):
+ # Skip undefined namespaces
+ continue
thisNs = family.namespace(self.site.lang, nsNumber)
defaultNs = family.namespace('_default', nsNumber)
More information about the Pywikipedia-l
mailing list