Message819
Logged In: YES
user_id=630223
Sorry, that code I gave does not come out very well when
viewed.
The problem is that, under windows, when the path does not
exist, the exception thrown is a WindowsError, which is a
subclass of os.error BUT uses a different numbering system
for errors.
So, under windows, the constant errno.ENOENT (2) does not
match the value in the exception object which is 3.
Actually the easiest, portable solution is take out the try
completely and put an if (path exists): before the shutil.rmtree
() line.
Cheers,
Mike
|
|
Date |
User |
Action |
Args |
2009-02-03 14:20:21 | admin | link | issue736830 messages |
2009-02-03 14:20:21 | admin | create | |
|