This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients vajrasky
Date 2013-12-01.09:57:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385891874.14.0.756593701822.issue19848@psf.upfronthosting.co.za>
In-reply-to
Content
Steps to reproduce the bug:
1. Download cute cat picture from internet. Name it CuteCat.jpg.

>>> import os
>>> os.listdir('.')
['CuteCat.jpg']

2. Create symbolic link.

>>> os.symlink('CuteCat.jpg', 'Aaawww.lnk')
>>> os.listdir('.')
['Aaawww.lnk', 'CuteCat.jpg']

3. Do it again.

>>> os.symlink('CuteCat.jpg', 'Aaawww.lnk')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileExistsError: [Errno 17] File exists: 'CuteCat.jpg'

Amusingly, it only happens on 3.4 (both Windows and Linux). 3.3 gives correct error message (in Linux, I did not test it on Windows). 2.7 omits the file information (in Linux, I did not test it on Windows). I'll check again the behaviour on Windows for 2.7 and 3.3.

Do we need unit test for this? Will we change the error message again in the future? For now, I omit it. Let me know if we need unit test.
History
Date User Action Args
2013-12-01 09:57:54vajraskysetrecipients: + vajrasky
2013-12-01 09:57:54vajraskysetmessageid: <1385891874.14.0.756593701822.issue19848@psf.upfronthosting.co.za>
2013-12-01 09:57:54vajraskylinkissue19848 messages
2013-12-01 09:57:53vajraskycreate