[issue20093] Wrong OSError message from os.rename() when dst is a non-empty directory
Jason Gerard DeRose
report at bugs.python.org
Sun Dec 29 01:50:27 CET 2013
New submission from Jason Gerard DeRose:
Under Python 3.3, if renaming a directory with `os.rename()` when the destination is an existing, non-empty directory, like this:
os.rename('/tmp/foo', '/tmp/bar')
You'll get an OSError with a message like this:
OSError: [Errno 39] Directory not empty: '/tmp/bar'
However, in the current Python 3.4.0b1 package in Ubuntu Trusty, this error message will contain the source directory name instead of the destination directory name, like this:
OSError: [Errno 39] Directory not empty: '/tmp/foo'
I've attached a test case, which also covers renaming directories relative to an open directory descriptor. This test case works on Python 3.3, fails on Python 3.4 Beta1.
----------
components: Library (Lib)
files: test_os_rename.py
messages: 207058
nosy: jderose
priority: normal
severity: normal
status: open
title: Wrong OSError message from os.rename() when dst is a non-empty directory
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33285/test_os_rename.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20093>
_______________________________________
More information about the Python-bugs-list
mailing list