http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10348
Revision: 10348 Author: drtrigon Date: 2012-06-11 23:03:00 +0000 (Mon, 11 Jun 2012) Log Message: ----------- bug fix; prevent the bot from crashing if write not possible
Modified Paths: -------------- trunk/pywikipedia/sum_disc.py
Modified: trunk/pywikipedia/sum_disc.py =================================================================== --- trunk/pywikipedia/sum_disc.py 2012-06-11 10:49:54 UTC (rev 10347) +++ trunk/pywikipedia/sum_disc.py 2012-06-11 23:03:00 UTC (rev 10348) @@ -1079,7 +1079,12 @@ (page, text, minEd) = (tmplsite, buf, True) # 'True' is default if (self._param['cleanup_count'] < 0): # default mode, w/o cleanup - self.append(page, text, comment=comment, minorEdit=minEd) + try: + self.append(page, text, comment=comment, minorEdit=minEd) + except pywikibot.MaxTriesExceededError: + logging.getLogger('sum_disc').warning( + u'Problem MaxTriesExceededError occurred, thus skipping this user!') + return # skip history write else: # append with cleanup text = self.cleanupDiscSum( self.load(page) or u'',
pywikipedia-svn@lists.wikimedia.org