http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10736
Revision: 10736 Author: huji Date: 2012-11-15 12:58:41 +0000 (Thu, 15 Nov 2012) Log Message: ----------- Reverts r10706 : errors should not pass silently
Modified Paths: -------------- trunk/pywikipedia/unusedfiles.py
Modified: trunk/pywikipedia/unusedfiles.py =================================================================== --- trunk/pywikipedia/unusedfiles.py 2012-11-15 08:36:45 UTC (rev 10735) +++ trunk/pywikipedia/unusedfiles.py 2012-11-15 12:58:41 UTC (rev 10736) @@ -116,15 +116,12 @@ pywikibot.output(u"%s done already" % page.title(asLink=True)) continue - try: - appendtext(page, u"\n\n"+template_image) - uploader = page.getFileVersionHistory().pop()[1] - usertalkname = u'User Talk:%s' % uploader - usertalkpage = pywikibot.Page(mysite, usertalkname) - msg2uploader = template_user % {'title': page.title()} - appendtext(usertalkpage, msg2uploader) - except: - continue + appendtext(page, u"\n\n"+template_image) + uploader = page.getFileVersionHistory().pop()[1] + usertalkname = u'User Talk:%s' % uploader + usertalkpage = pywikibot.Page(mysite, usertalkname) + msg2uploader = template_user % {'title': page.title()} + appendtext(usertalkpage, msg2uploader)
if __name__ == "__main__": try:
pywikipedia-svn@lists.wikimedia.org