[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

This looks to work correctly in default branch,

 os.link('non-existent-name', 'new-name')
Traceback (most recent call last):
  File stdin, line 1, in module
FileNotFoundError: [WinError 2] The system cannot find the file specified: 
'non-existent-name'

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

Behavior for symlink is as follows

 os.symlink('non-existent-name', 'existing-name')
Traceback (most recent call last):
  File stdin, line 1, in module
PermissionError: [WinError 5] Access is denied: 'non-existent-name'

The error message is misleading, but can be fixed using the patch attached to 
issue13775

 os.symlink('non-existent-name1', 'non-existent-name2')
No error. This behavior is same on Windows and Linux. Seems odd, but can be 
justified as ok behavior.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

issue13775, issue16074, and issue16812 all are virtually about the same bug. 
There is no working patch in any issue, but the discussion in issue16074 is 
longer.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - bad error message in os.rename

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2012-12-29 Thread Andrew

New submission from Andrew:

When attempting to make a symlink using a name that already exists, a 
FileExistsError is raised (and rightfully so), but it lists the source name 
rather than the destination name. However, the existing destination name is 
what causes the exception to be raised, not the existing source. Since the 
FileExistsError is WinError 183 and I haven't attempted this on another OS, I'm 
marking this as Windows-specific. Issue 13775 seems to be related.

--
components: Windows
messages: 178493
nosy: IAmTheClaw
priority: normal
severity: normal
status: open
title: os.symlink can return wrong FileExistsError/WindowsError information
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2012-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue16074.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2012-12-29 Thread Andrew

Andrew added the comment:

I tested this on FreeBSD 9.1, and the error message is correct there.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com