[issue9572] IOError or OSError in test_multiprocessing

Łukasz Czuja report at bugs.python.org
Thu Aug 26 06:38:13 CEST 2010


Łukasz Czuja <lukasz at czuja.pl> added the comment:

I Had the same issue while using the lib. I had to replace every: IOError with (IOError, OSError) to catch both and just then compare exc.errno.

Also in your r84271 commit, on line 507 you did:

507 : 	with _io.FileIO(path, 'wb') as file: 

shouldn't it be:

507 : 	with _closing(_io.FileIO(path, 'wb')) as file: 

as in previous commit? In case of an error, you're not closing the file properly. Or am I reading that wrong?

Cheers.

----------

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


More information about the Python-bugs-list mailing list