Revision: 5033 Author: rotem Date: 2008-02-15 19:52:58 +0000 (Fri, 15 Feb 2008)
Log Message: ----------- Removing knownlanguages, no longer used.
Modified Paths: -------------- trunk/pywikipedia/checkimages.py trunk/pywikipedia/family.py trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2008-02-15 19:40:51 UTC (rev 5032) +++ trunk/pywikipedia/checkimages.py 2008-02-15 19:52:58 UTC (rev 5033) @@ -746,7 +746,7 @@ # If there's an hidden template, change the used HiddenTN = wikipedia.translate(site, HiddenTemplateNotification) # A template as {{en is not a license! Adding also them in the whitelist template... - for langK in wikipedia.Family('wikipedia').knownlanguages: + for langK in wikipedia.Family('wikipedia').langs.keys(): hiddentemplate.append('%s' % langK)
# If the images to skip are 0, set the skip variable to False (the same for the wait time)
Modified: trunk/pywikipedia/family.py =================================================================== --- trunk/pywikipedia/family.py 2008-02-15 19:40:51 UTC (rev 5032) +++ trunk/pywikipedia/family.py 2008-02-15 19:52:58 UTC (rev 5033) @@ -30,10 +30,6 @@ 'tr','tk','tw','udm','bug','uk','ur','vec','vo','fiu-vro','wa', 'vls','war','wo','wuu','ts','ii','yi','yo','zh-yue','cbk-zam','diq','zea','bat-smg','zh']
- # knownlanguages is the same list but sorted by code - self.knownlanguages = list(self.alphabetic) - self.knownlanguages.sort() - self.langs = {}
# Translation used on all wikis for the different namespaces.
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-02-15 19:40:51 UTC (rev 5032) +++ trunk/pywikipedia/wikipedia.py 2008-02-15 19:52:58 UTC (rev 5033) @@ -665,10 +665,6 @@ while not textareaFound: text = self.site().getUrl(path, sysop = sysop)
- # Because language lists are filled in a lazy way in the family - # files of Wikimedia projects (using Family.knownlanguages), you - # may encounter pages from non-existing wikis such as - # http://eo.wikisource.org/ if text.find("<title>Wiki does not exist</title>") != -1: raise NoSuchSite(u'Wiki %s does not exist yet' % self.site())
@@ -2467,10 +2463,6 @@ elif dt < 360: dt += 60 else: - # Because language lists are filled in a lazy way in the family - # files of Wikimedia projects (using Family.knownlanguages), you - # may encounter pages from non-existing wikis such as - # http://eo.wikisource.org/ if data.find("<title>Wiki does not exist</title>") != -1: raise NoSuchSite(u'Wiki %s does not exist yet' % self.site) elif data.find("<siteinfo>") == -1: # This probably means we got a 'temporary unaivalable'