Message204899
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. |
|
Date |
User |
Action |
Args |
2013-12-01 09:57:54 | vajrasky | set | recipients:
+ vajrasky |
2013-12-01 09:57:54 | vajrasky | set | messageid: <1385891874.14.0.756593701822.issue19848@psf.upfronthosting.co.za> |
2013-12-01 09:57:54 | vajrasky | link | issue19848 messages |
2013-12-01 09:57:53 | vajrasky | create | |
|