[Pywikipedia-l] SVN: [5742] trunk/pywikipedia/interwiki.py

leogregianin at svn.wikimedia.org leogregianin at svn.wikimedia.org
Sat Jul 19 18:26:32 UTC 2008


Revision: 5742
Author:   leogregianin
Date:     2008-07-19 18:26:32 +0000 (Sat, 19 Jul 2008)

Log Message:
-----------
revert my last add patch 

Modified Paths:
--------------
    trunk/pywikipedia/interwiki.py

Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py	2008-07-19 09:27:54 UTC (rev 5741)
+++ trunk/pywikipedia/interwiki.py	2008-07-19 18:26:32 UTC (rev 5742)
@@ -459,7 +459,6 @@
     rememberno = False
     followinterwiki = True
     minsubjects = config.interwiki_min_subjects
-    namespacePairs = []
 
 class Subject(object):
     """
@@ -617,20 +616,7 @@
                     wikipedia.output(u"NOTE: Ignoring link from page %s in namespace %i to page %s in namespace %i because page %s in the correct namespace has already been found." % (self.originPage.aslink(True), self.originPage.namespace(), linkedPage.aslink(True), linkedPage.namespace(), preferredPage.aslink(True)))
                     return True
                 else:
-                    if (self.originPage.site(), self.originPage.namespace(), linkedPage.site(), linkedPage.namespace()) in Global.namespacePairs\
-                    or (linkedPage.site(), linkedPage.namespace(),self.originPage.site(), self.originPage.namespace()) in Global.namespacePairs:
-                        wikipedia.output('NOTE: %s is in namespace %i, and %s is in namespace %i.'
-                                         % (self.originPage.aslink(True), self.originPage.namespace(),
-                                            linkedPage.aslink(True), linkedPage.namespace()))
-                        choice = 'y'
-                    else:
-                        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', 'All'], ['y', 'n', 'a'])
-                    if choice == 'a':
-                        pair = self.originPage.site(), self.originPage.namespace(), linkedPage.site(), linkedPage.namespace()
-                        Global.namespacePairs.append(pair)
+                    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'], ['y', 'n'])
                     if choice != 'y':
                         # Fill up foundIn, so that we will not ask again
                         self.foundIn[linkedPage] = [linkingPage]





More information about the Pywikipedia-l mailing list