Revision: 6762 Author: nicdumz Date: 2009-04-30 08:13:06 +0000 (Thu, 30 Apr 2009)
Log Message: ----------- Converting to StoredPage everywhere
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-04-30 08:08:00 UTC (rev 6761) +++ trunk/pywikipedia/interwiki.py 2009-04-30 08:13:06 UTC (rev 6762) @@ -796,6 +796,8 @@ pages = titletranslate.translate(self.originPage, hints = hints, auto = globalvar.auto, removebrackets = globalvar.hintnobracket) for page in pages: + if globalvar.contentsondisk: + page = StoredPage(page) self.todo.add(page) self.foundIn[page] = [None] if keephintedsites: @@ -897,6 +899,9 @@ if globalvar.autonomous: wikipedia.output(u"NOTE: Ignoring link from page %s in namespace %i to page %s in namespace %i." % (self.originPage.aslink(True), self.originPage.namespace(), linkedPage.aslink(True), linkedPage.namespace())) # Fill up foundIn, so that we will not write this notice + if globalvar.contentsondisk: + linkedPage = StoredPage(linkedPage) + self.foundIn[linkedPage] = [linkingPage] return True else: @@ -908,6 +913,9 @@ choice = wikipedia.inputChoice('WARNING: %s is in namespace %i, but %s is in namespace %i. Follow it anyway?' % (self.originPage.aslink(True), self.originPage.namespace(), linkedPage.aslink(True), linkedPage.namespace()), ['Yes', 'No', 'Add an alternative', 'give up'], ['y', 'n', 'a', 'g']) if choice != 'y': # Fill up foundIn, so that we will not ask again + if globalvar.contentsondisk: + linkedPage = StoredPage(linkedPage) + self.foundIn[linkedPage] = [linkingPage] if choice == 'g': self.makeForcedStop(counter)
pywikipedia-svn@lists.wikimedia.org