http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11477
Revision: 11477 Author: xqt Date: 2013-04-28 12:08:31 +0000 (Sun, 28 Apr 2013) Log Message: ----------- Don't close on throttle file while IOError exception, bugfix for bug #3611608; update from rewrite r11476
Modified Paths: -------------- trunk/pywikipedia/pywikibot/throttle.py
Modified: trunk/pywikipedia/pywikibot/throttle.py =================================================================== --- trunk/pywikipedia/pywikibot/throttle.py 2013-04-28 12:07:17 UTC (rev 11476) +++ trunk/pywikipedia/pywikibot/throttle.py 2013-04-28 12:08:31 UTC (rev 11477) @@ -121,7 +121,8 @@ f.write("%(pid)s %(time)s %(site)s\n" % p) except IOError: pass - f.close() + else: + f.close() self.process_multiplicity = count if self.verbosedelay or pywikibot.verbose: pywikibot.output( @@ -218,7 +219,7 @@ for p in processes: f.write("%(pid)s %(time)s %(site)s\n" % p) except IOError: - pass + return f.close()
def __call__(self, requestsize=1, write=False):
pywikipedia-svn@lists.wikimedia.org