[Python-Dev] Re: Coernic Desktop Search versus shutil.rmtree
jcarlson at uci.edu
Thu Sep 2 18:59:19 CEST 2004
> so a possible robustification would be to add
> def _rmdir(path):
> except IOError, v:
> if sys.platform == "win32" and (directory not empty):
> and use _rmdir instead of os.rmdir in _build_cmdtuple...
Only for this test.
In the general case, there could be other reasons why that deletion
failed. One that I run into relatively often is...
command: python -c 'import os;os.remove("name")'
In this case, the OSError is the correct thing, and shouldn't be hidden
with a 'sleep'.
More information about the Python-Dev