[Pywikipedia-l] SVN: [6268] trunk/pywikipedia

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Mon Jan 19 00:28:40 UTC 2009


Revision: 6268
Author:   russblau
Date:     2009-01-19 00:28:40 +0000 (Mon, 19 Jan 2009)

Log Message:
-----------
Reverting changes committed in error

Modified Paths:
--------------
    trunk/pywikipedia/redirect.py
    trunk/pywikipedia/wikipedia.py
    trunk/pywikipedia/xmlreader.py

Modified: trunk/pywikipedia/redirect.py
===================================================================
--- trunk/pywikipedia/redirect.py	2009-01-18 23:56:25 UTC (rev 6267)
+++ trunk/pywikipedia/redirect.py	2009-01-19 00:28:40 UTC (rev 6268)
@@ -252,7 +252,7 @@
             mysite = wikipedia.getSite()
             # retrieve information from the live wiki's maintenance page
             # double redirect maintenance page's URL
-            wikipedia.config.special_page_limit = 1000
+#            wikipedia.config.special_page_limit = 1000
             path = mysite.double_redirects_address(default_limit = False)
             wikipedia.output(u'Retrieving special page...')
             maintenance_txt = mysite.getUrl(path)

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2009-01-18 23:56:25 UTC (rev 6267)
+++ trunk/pywikipedia/wikipedia.py	2009-01-19 00:28:40 UTC (rev 6268)
@@ -3436,13 +3436,7 @@
                         break
                     groupID = groupMatch.group('name') or int(groupMatch.group('number'))
                     replacement = replacement[:groupMatch.start()] + match.group(groupID) + replacement[groupMatch.end():]
-            try:
-                text = text[:match.start()] + replacement + text[match.end():]
-            except:
-                print text
-                print match.start(), match.end()
-                print replacement
-                raise
+            text = text[:match.start()] + replacement + text[match.end():]
 
             # continue the search on the remaining text
             if allowoverlap:

Modified: trunk/pywikipedia/xmlreader.py
===================================================================
--- trunk/pywikipedia/xmlreader.py	2009-01-18 23:56:25 UTC (rev 6267)
+++ trunk/pywikipedia/xmlreader.py	2009-01-19 00:28:40 UTC (rev 6268)
@@ -160,8 +160,8 @@
             # Remove trailing newlines and spaces
             while text and text[-1] in '\n ':
                 text = text[:-1]
-##            # Replace newline by cr/nl
-##            text = u'\r\n'.join(text.split('\n'))
+            # Replace newline by cr/nl
+            text = u'\r\n'.join(text.split('\n'))
             # Decode the timestamp
             timestamp = (self.timestamp[0:4]+
                          self.timestamp[5:7]+





More information about the Pywikipedia-l mailing list