Message169032
os.path.isdir("foo") will return True if "foo" is a symlink to a directory, and then shutil.rmtree("foo") will fail:
>>> os.path.isdir("foo")
True
>>> os.path.islink("foo")
True
>>> shutil.rmtree("foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/antoine/opt/lib/python3.3/shutil.py", line 456, in rmtree
"Not a directory: '{}'".format(path))
NotADirectoryError: [Errno 20] Not a directory: 'foo' |
|
Date |
User |
Action |
Args |
2012-08-24 15:58:19 | pitrou | set | recipients:
+ pitrou, georg.brandl, vinay.sajip, asvetlov, stefanholek |
2012-08-24 15:58:19 | pitrou | set | messageid: <1345823899.82.0.194995657882.issue15776@psf.upfronthosting.co.za> |
2012-08-24 15:58:19 | pitrou | link | issue15776 messages |
2012-08-24 15:58:19 | pitrou | create | |
|