[Pywikipedia-l] SVN: [5743] trunk/pywikipedia/commonsdelinker/image_replacer.py
btongminh at svn.wikimedia.org
btongminh at svn.wikimedia.org
Sun Jul 20 20:13:38 UTC 2008
Revision: 5743
Author: btongminh
Date: 2008-07-20 20:13:38 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
Don't die on redirects
Modified Paths:
--------------
trunk/pywikipedia/commonsdelinker/image_replacer.py
Modified: trunk/pywikipedia/commonsdelinker/image_replacer.py
===================================================================
--- trunk/pywikipedia/commonsdelinker/image_replacer.py 2008-07-19 18:26:32 UTC (rev 5742)
+++ trunk/pywikipedia/commonsdelinker/image_replacer.py 2008-07-20 20:13:38 UTC (rev 5743)
@@ -253,6 +253,8 @@
except wikipedia.NoPage:
output(u'Warning! Unable to report replacement to %s. Page does not exist!' % old_image)
return
+ except wikipedia.IsRedirectPage:
+ output(u'Warning! %s is a redirect; not reporting replacement!' % old_image)
try:
page.put(u'%s\n%s' % (template, text),
More information about the Pywikipedia-l
mailing list