New submission from Denis Sukhonin: 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 ---------- components: Library (Lib) messages: 234946 nosy: negval priority: normal severity: normal status: open title: shutil.rmtree doesn't work correctly on FreeBSD. type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com