Hello,

Has anybody seen an exception "OSError: [Errno 39] Directory not empty" raised by shutil.rmtree? The code that raised an exception creates a lot of directories with files, and then removes them. I got an exception when one of such directories was removed. Here is the backtrace:

    shutil.rmtree(filename)
  File "/usr/lib64/python2.5/shutil.py", line 178, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib64/python2.5/shutil.py", line 176, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: /path/to/my/dir

According to the documentation, shutil.rmtree should not care about directory being not empty.

Thanks for the help,
Masha
--------------------
liu...@usc.edu



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to