Message38
Running the test suite under Windows (I'm using '98
SE) leads to a WindowsError being raised.
test_init.py specifically tries to catch a
WindowsError with error code 3 (which occurs when the
call to shutil.rmtree(self.dir) fails), but it doesn't
catch it and the error is raised to the user.
The problem appears to be due to the fact that
WindowsError subclasses OSError, but OSError is tested
for first and its error code checked against some
number that isn't 3; when the check fails the error is
propagated, and the WindowsError clause is never
reached.
I've fixed this on my own copy by changing the order
of the except statements so that the more specific
WindowsError clause comes first: if the exception
really is a WindowsError, it will be dealt with
specially; if it's just an OSError, things should
proceed as before.
Cheers,
Steve |
|
Date |
User |
Action |
Args |
2009-02-03 14:19:58 | admin | link | issue475347 messages |
2009-02-03 14:19:58 | admin | create | |
|