http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9172
Revision: 9172 Author: a_engels Date: 2011-04-15 06:07:00 +0000 (Fri, 15 Apr 2011) Log Message: ----------- deal with the self.originPage == None case (I think it occurs if the original page has bug #3081100, but I'm not sure about that)
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2011-04-13 19:57:44 UTC (rev 9171) +++ trunk/pywikipedia/interwiki.py 2011-04-15 06:07:00 UTC (rev 9172) @@ -1725,24 +1725,25 @@ raise "Bugcheck: finish called before done" if not self.workonme: return - if self.forcedStop: # autonomous with problem - pywikibot.output(u"======Aborted processing %s======" % self.originPage.aslink(True)) - return if self.originPage: if self.originPage.isRedirectPage(): return if self.originPage.isCategoryRedirect(): return + else: + return if not self.untranslated and globalvar.untranslatedonly: return + if self.forcedStop: # autonomous with problem + pywikibot.output(u"======Aborted processing %s======" % self.originPage.aslink(True)) + return # The following check is not always correct and thus disabled. # self.done might contain no interwiki links because of the -neverlink # argument or because of disambiguation conflicts. # if len(self.done) == 1: # # No interwiki at all # return - if self.originPage: - pywikibot.output(u"======Post-processing %s======" % self.originPage.aslink(True)) + pywikibot.output(u"======Post-processing %s======" % self.originPage.aslink(True)) # Assemble list of accepted interwiki links new = self.assemble() if new is None: # User said give up