Revision: 7612 Author: xqt Date: 2009-11-09 12:22:38 +0000 (Mon, 09 Nov 2009)
Log Message: ----------- Bugfix for InvalidTitle Error (#2893194)
Modified Paths: -------------- trunk/pywikipedia/fixing_redirects.py
Modified: trunk/pywikipedia/fixing_redirects.py =================================================================== --- trunk/pywikipedia/fixing_redirects.py 2009-11-09 09:16:50 UTC (rev 7611) +++ trunk/pywikipedia/fixing_redirects.py 2009-11-09 12:22:38 UTC (rev 7612) @@ -83,7 +83,7 @@ # Make sure that next time around we will not find this same hit. curpos = m.start() + 1 # ignore interwiki links and links to sections of the same page - if m.group('title') == '' or mysite.isInterwikiLink(m.group('title')): + if m.group('title').strip() == '' or mysite.isInterwikiLink(m.group('title')): continue else: actualLinkPage = wikipedia.Page(targetPage.site(), m.group('title')) @@ -157,7 +157,7 @@ try: page.put(text, comment) except (wikipedia.Error): - wikipedia.output('Error : unable to put %s' % page.aslink()) + wikipedia.output('Error: unable to put %s' % page.aslink())
def main(): start = '!'
pywikipedia-svn@lists.wikimedia.org