[Pywikipedia-l] SVN: [4694] trunk/pywikipedia/wikipedia.py
rotem at svn.wikimedia.org
rotem at svn.wikimedia.org
Tue Dec 11 13:57:27 UTC 2007
Revision: 4694
Author: rotem
Date: 2007-12-11 13:57:21 +0000 (Tue, 11 Dec 2007)
Log Message:
-----------
When comparing the namespaces, also check for namespaces that don't actually exist but are defined.
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-12-11 13:21:14 UTC (rev 4693)
+++ trunk/pywikipedia/wikipedia.py 2007-12-11 13:57:21 UTC (rev 4694)
@@ -2471,6 +2471,9 @@
# self.site.family.namespaces[id][lang] = nshdr
else:
output(u"WARNING: Missing namespace in family file %s: namespace['%s'][%i] (it is set to '%s')" % (self.site.family.name, lang, id, nshdr))
+ for id in self.site.family.namespaces:
+ if self.site.family.isDefinedNSLanguage(id, lang) and not header.namespaces.has_key(id):
+ output(u"WARNING: Family file %s includes namespace['%s'][%i], but it should be removed (namespace doesn't exist in the site)" % (self.site.family.name, lang, id))
def getData(self):
address = self.site.export_address()
More information about the Pywikipedia-l
mailing list