Revision: 6701 Author: nicdumz Date: 2009-04-25 08:35:16 +0000 (Sat, 25 Apr 2009)
Log Message: ----------- Putting the easy to evaluate condition first
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-04-25 07:29:01 UTC (rev 6700) +++ trunk/pywikipedia/interwiki.py 2009-04-25 08:35:16 UTC (rev 6701) @@ -932,11 +932,11 @@ self.todo = PageTree() elif not globalvar.followredirect: wikipedia.output(u"NOTE: not following redirects.") - else: - if not (self.skipPage(page, redirectTargetPage, counter) or (page.site().family != redirectTargetPage.site().family)): - if self.addIfNew(redirectTargetPage, counter, page): - if config.interwiki_shownew: - wikipedia.output(u"%s: %s gives new redirect %s" % (self.originPage.aslink(), page.aslink(True), redirectTargetPage.aslink(True))) + elif page.site().family == redirectTargetPage.site().family \ + and not self.skipPage(page, redirectTargetPage, counter): + if self.addIfNew(redirectTargetPage, counter, page): + if config.interwiki_shownew: + wikipedia.output(u"%s: %s gives new redirect %s" % (self.originPage.aslink(), page.aslink(True), redirectTargetPage.aslink(True)))
continue
pywikipedia-svn@lists.wikimedia.org