[issue9572] IOError or OSError in test_multiprocessing

2010-08-25 Thread Łukasz Czuja

Łukasz Czuja  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 
<http://bugs.python.org/issue9572>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9572] IOError in test_multiprocessing

2010-08-24 Thread Łukasz Czuja

Łukasz Czuja  added the comment:

I was just playing around with the changes you made and it seems you've 
overlooked a small error/typo around line 502:

502 :   n elif errno == errno.EACCES: 

quick fix:

502 :   n elif exc.errno == errno.EACCES: 

Hope this helps.

--
nosy: +sniffer

___
Python tracker 
<http://bugs.python.org/issue9572>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com