Revision: 7237 Author: filnik Date: 2009-09-13 10:35:02 +0000 (Sun, 13 Sep 2009)
Log Message: ----------- Bugfix by xqt, patch: 2857453
Modified Paths: -------------- trunk/pywikipedia/redirect.py
Modified: trunk/pywikipedia/redirect.py =================================================================== --- trunk/pywikipedia/redirect.py 2009-09-13 10:30:43 UTC (rev 7236) +++ trunk/pywikipedia/redirect.py 2009-09-13 10:35:02 UTC (rev 7237) @@ -69,6 +69,7 @@
# Summary message for fixing double redirects msg_double={ + 'als': u'Bötli: Uflesung vum doppelte Redirect', 'ar': u'روبوت: تصليح تحويلة مزدوجة', 'bat-smg': u'Robots: Taisuoms dvėgobs paradresavėms', 'be-x-old': u'Робат: выпраўленьне падвойнага перанакіраваньня', @@ -91,6 +92,7 @@ 'ksh':u'Bot: [[special:doubleredirects|Dubbel Ömlëijdong]] fottjemaat', 'lb': u'Bot: Duebel Viruleedung gefléckt', 'lt': u'robotas: Taisomas dvigubas peradresavimas', + 'mk': u'Бот: Исправка на двојни пренасочувања', 'nds':u'Bot: Dubbelte Wiederleiden rutmakt', 'nl': u'Bot: dubbele doorverwijzing gecorrigeerd', 'nn': u'robot: retta dobbel omdirigering', @@ -662,6 +664,9 @@ wikipedia.output( u"Warning: Redirect target %s doesn't exist." % newRedir.aslink()) + except wikipedia.ServerError: + wikipedia.output(u'Skipping: Server Error') + break else: wikipedia.output( u' Links to: %s.' @@ -680,6 +685,7 @@ wikipedia.output( u'Warning: Redirect target %s forms a redirect loop.' % targetPage.aslink()) + break ###xqt doesn't work. edits twice! try: content = targetPage.get(get_redirect=True) except wikipedia.SectionError: @@ -702,7 +708,11 @@ else: newRedir = targetPage continue # + try: oldText = redir.get(get_redirect=True) + except wikipedia.BadTitle: + wikipedia.output(u"Bad Title Error") + break text = mysite.redirectRegex().sub( '#%s %s' % (mysite.redirect( True ), @@ -820,7 +830,6 @@ ns = int(ns) except ValueError: #-namespace:all Process all namespaces. Works only with the API read interface. -#-namespace:all Process all namespaces. Works only with the API read interface. pass if not ns in namespaces: namespaces.append(ns)
pywikipedia-svn@lists.wikimedia.org