Message234946
shutil.rmtree doesn't work correctly on FreeBSD 9.1.
For example if I create a path /tmp/test and try to remove it, I get an exception:
>>> shutil.rmtree('/tmp/test')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/shutil.py", line 463, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/usr/local/lib/python3.4/shutil.py", line 385, in _rmtree_safe_fd
onerror(os.listdir, path, sys.exc_info())
File "/usr/local/lib/python3.4/shutil.py", line 382, in _rmtree_safe_fd
names = os.listdir(topfd)
OSError: [Errno 22] Invalid argument: '/tmp/test'
---
shutil._use_fd_functions has value True. When I change it to False, the shutil.rmtree works perfecty.
Version info:
>>> print(sys.version)
3.4.2 (default, Dec 22 2014, 21:56:20)
[GCC 4.2.1 20070831 patched [FreeBSD]]
>>> print(sys.platform)
freebsd9
$ uname -r
9.1-RELEASE |
|
Date |
User |
Action |
Args |
2015-01-29 04:52:53 | negval | set | recipients:
+ negval |
2015-01-29 04:52:53 | negval | set | messageid: <1422507173.88.0.069796427202.issue23346@psf.upfronthosting.co.za> |
2015-01-29 04:52:53 | negval | link | issue23346 messages |
2015-01-29 04:52:53 | negval | create | |
|