http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11476
Revision: 11476 Author: xqt Date: 2013-04-28 12:07:17 +0000 (Sun, 28 Apr 2013) Log Message: ----------- Don't close on throttle file while IOError exception, bugfic for bug #3611608
Modified Paths: -------------- branches/rewrite/pywikibot/throttle.py
Modified: branches/rewrite/pywikibot/throttle.py =================================================================== --- branches/rewrite/pywikibot/throttle.py 2013-04-28 12:04:25 UTC (rev 11475) +++ branches/rewrite/pywikibot/throttle.py 2013-04-28 12:07:17 UTC (rev 11476) @@ -122,7 +122,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: pywikibot.output( @@ -223,7 +224,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