Revision: 6777 Author: nicdumz Date: 2009-04-30 13:48:48 +0000 (Thu, 30 Apr 2009)
Log Message: ----------- Being bold. Languages_by_size should contain all the site codes. This fixes bug [ 2783407 ] -limittwo option does not work correctly
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-04-30 12:54:17 UTC (rev 6776) +++ trunk/pywikipedia/interwiki.py 2009-04-30 13:48:48 UTC (rev 6777) @@ -211,7 +211,7 @@ -localonly only work on the local wiki, not on other wikis in the family I have a login at. (note: without ending colon)
- -limittwo only update two pages - one in the local wiki (if loged-in), + -limittwo only update two pages - one in the local wiki (if logged-in) and one in the top available one. For example, if the local page has links to de and fr, this option will make sure that only local and de: (larger) @@ -1352,14 +1352,7 @@ lclSiteDone = False frgnSiteDone = False
- # XXX Do we really need to make an union here? - # we should have sorted(languages_by_size) = sorted(langs) ?! - langBySize = set(lclSite.family.languages_by_size) - allLangs = set(lclSite.family.langs) - - langToCheck = (langBySize | allLangs).difference(lclSite.family.obsolete) - - for siteCode in langToCheck: + for siteCode in lclSite.family.languages_by_size: site = wikipedia.getSite(code = siteCode) if (not lclSiteDone and site == lclSite) or (not frgnSiteDone and site != lclSite and site in new): if site == lclSite:
pywikipedia-svn@lists.wikimedia.org