Revision: 4225 Author: russblau Date: 2007-09-10 19:14:03 +0000 (Mon, 10 Sep 2007)
Log Message: ----------- Catch more exceptions
Modified Paths: -------------- trunk/pywikipedia/catlib.py
Modified: trunk/pywikipedia/catlib.py =================================================================== --- trunk/pywikipedia/catlib.py 2007-09-10 16:55:02 UTC (rev 4224) +++ trunk/pywikipedia/catlib.py 2007-09-10 19:14:03 UTC (rev 4225) @@ -432,6 +432,16 @@ wikipedia.output(u'Skipping %s because of edit conflict' % article.title()) except wikipedia.LockedPage: wikipedia.output(u'Skipping locked page %s' % article.title()) + except wikipedia.SpamFilterError, error: + wikipedia.output(u'Changing page %s blocked by spam filter (URL=%s)' + % (article.title(), error.url)) + except wikipedia.NoUsername: + wikipedia.output( + u"Page [[%s]] not saved; sysop privileges required." + % article.title()) + except wikipedia.PageNotSaved, error: + wikipedia.output(u"Saving page [[%s]] failed: %s" + % (page.title(), error.message)) return
# This loop will replace all occurrences of the category to be changed, and remove duplicates.