[issue29657] os.symlink: FileExistsError shows wrong message

Serhiy Storchaka report at bugs.python.org
Sat Mar 4 01:03:52 EST 2017


Serhiy Storchaka added the comment:

This is not about how a symbolic link is represented. This is about how the operation of creating a symbolic link is represented. The first filename is the first argument of os.symlink(), the second filename is the second argument. Try to run

    os.symlink('a', 'a_link')
    os.symlink('b', 'a_link')

You should get an error:

    FileExistsError: [Errno 17] File exists: 'b' -> 'a_link'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29657>
_______________________________________


More information about the Python-bugs-list mailing list