Revision: 4451 Author: a_engels Date: 2007-10-16 12:36:53 +0000 (Tue, 16 Oct 2007)
Log Message: ----------- Do not auto-reject pages in other namespaces if the page because of which you are auto-rejecting does not exist or is a redirect page.
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2007-10-16 10:39:49 UTC (rev 4450) +++ trunk/pywikipedia/interwiki.py 2007-10-16 12:36:53 UTC (rev 4451) @@ -418,13 +418,11 @@ have been found, the first one will be returned. Otherwise, None will be returned. """ - # Hmmm... working on the todo list is quite risky, - # because we don't know yet if the pages there - # really exist... for page in self.done + self.pending + self.todo: if page.site() == site: if page.namespace() == self.originPage.namespace(): - return page + if page.exists() and not page.isRedirectPage(): + return page return None
def translate(self, hints = None):