On Saturday 24 February 2007 17:22, Dan Nicholson wrote:

> Oh, I was unprivileged, just in my home directory. What about you?
> I'll try to see what happens if I run as root (although I'm not too
> keen on the concept of removing /tmp on purpose :)

Yeah, I was running as root, and I've now figured out the cause of the 
problem!  The last line in the test is:

os.removedirs(path).

>From the Python docs:

Removes directories recursively. Works like rmdir() except that, if the leaf 
directory is successfully removed, removedirs() tries to successively remove 
every parent directory mentioned in path until an error is raised (which is 
ignored, because it generally means that a parent directory is not empty).

For now, I can work around the problem by doing `touch /tmp/marker' because 
os.rmdir(), and hence os.removedirs() doesn't work on non-empty directories.

Matt.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to