Revision: 6015 Author: a_engels Date: 2008-10-24 18:29:39 +0000 (Fri, 24 Oct 2008)
Log Message: ----------- Fixed a bug where the number of pages to do was updated incorrectly when more than one hint was given for the same language.
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2008-10-23 21:56:01 UTC (rev 6014) +++ trunk/pywikipedia/interwiki.py 2008-10-24 18:29:39 UTC (rev 6015) @@ -554,13 +554,16 @@ self.todo.append(page) self.foundIn[page] = [None]
- def openSites(self): + def openSites(self, allowdoubles = False): """Return a list of sites for all things we still need to do""" distinctSites = {}
for page in self.todo: site = page.site() - distinctSites[site] = site + if allowdoubles: + distinctSites[page] = site + else: + distinctSites[site] = site return distinctSites.values()
def willWorkOn(self, site): @@ -1332,7 +1335,7 @@ """Add a single subject to the list""" subj = Subject(page, hints = hints) self.subjects.append(subj) - for site in subj.openSites(): + for site in subj.openSites(allowdoubles = True): # Keep correct counters self.plus(site)
pywikipedia-l@lists.wikimedia.org