This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 draghuram
收信人 draghuram, ntkoopman
日期 2007-12-20.15:43:25
SpamBayes Score 0.48571998
Marked as misclassified
Message-id <1198165406.11.0.486888917434.issue1669@psf.upfronthosting.co.za>
In-reply-to
内容
Please try to include stack trace in bug reports. I reproduced the error
on my Linux (SuSE 10). 

marvin:tmp$ ls -l dirlink testdir
lrwxrwxrwx 1 raghu users    7 2007-12-20 10:10 dirlink -> testdir/

testdir:
total 0
-rw-r--r-- 1 raghu users 0 2007-12-20 10:36 testfile

shutil.rmtree('dirlink') produces:

----------
Traceback (most recent call last):
  File "t.py", line 4, in <module>
    shutil.rmtree('dirlink')
  File "/localhome/raghu/localwork/cpython/python/Lib/shutil.py", line
194, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/localhome/raghu/localwork/cpython/python/Lib/shutil.py", line
192, in rmtree
    os.rmdir(path)
OSError: [Errno 20] Not a directory: 'dirlink'
----------

While we are removing the contents of the target directory as expected,
the final 'rmdir' fails on removing the symbolic link. For the sake of
consistency, we can explicitly remove the target directory and leave the
symbolic link intact. Is this what you are expecting?
历史
日期 用户 动作 参数
2007-12-20 15:43:26draghuram修改spambayes_score: 0.48572 -> 0.48571998
recipients: + draghuram, ntkoopman
2007-12-20 15:43:26draghuram修改spambayes_score: 0.48572 -> 0.48572
messageid: <1198165406.11.0.486888917434.issue1669@psf.upfronthosting.co.za>
2007-12-20 15:43:26draghuram链接issue1669 messages
2007-12-20 15:43:25draghuram创建