in reply to rmtree() is failing after some time

And while not directly germane to your problem your code has a problem:

You should be aware that checking for the existence of a file (or directory) and then doing something to/with that same file can introduce a race condition which can cause (at best) intermittent bugs or (worse) have security implications, so in general you shouldn't write code that way. It's better to go ahead and take the action and deal with a failure or exception if it occurs.

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re: rmtree() is failing after some time

Replies are listed 'Best First'.
Re^2: rmtree() is failing after some time
by Anonymous Monk on Apr 23, 2009 at 13:18 UTC
    Maybe eventually its using same temp directory among two threads