[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

Vinay Sajip report at bugs.python.org
Sun Apr 22 21:16:30 CEST 2012


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

John: Thanks for the updated patch.

Charles-François: Certainly I can reduce the iterations to make the test faster. As it is, I did reproduce the failure on my dev system, but only once, after running John's test script about a dozen times: every other time, it completed successfully :-(

Isn't it simpler if I just replace the os.path.exists() calls with os.stat(), and check for ENOENT if an exception of type OSError or WindowsError occurs?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14632>
_______________________________________


More information about the Python-bugs-list mailing list