Revision: 8421 Author: xqt Date: 2010-08-20 13:10:51 +0000 (Fri, 20 Aug 2010)
Log Message: ----------- use dictionary, otherwise a index error raises if the namespaces isn't predefined by family.py
Modified Paths: -------------- trunk/pywikipedia/generate_family_file.py
Modified: trunk/pywikipedia/generate_family_file.py =================================================================== --- trunk/pywikipedia/generate_family_file.py 2010-08-20 12:09:09 UTC (rev 8420) +++ trunk/pywikipedia/generate_family_file.py 2010-08-20 13:10:51 UTC (rev 8421) @@ -191,7 +191,7 @@ for nsid, langs in self.nsinfo.iteritems(): for lang, translations in langs.iteritems(): data += " " * indent - data += "self.namespaces[%(nsid)i][%(lang)r] = %(translations)r" % locals() + data += "self.namespaces[%(nsid)i] = {%(lang)r : %(translations)r}" % locals() data += "\n" return data