[issue15461] os.stat() 's inappropriate behavior when dealing with a broken link in linux systems.

2012-07-27 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

For the sake of completeness: what you're looking for is os.lstat.

--
nosy: +hynek

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



[issue15461] os.stat() 's inappropriate behavior when dealing with a broken link in linux systems.

2012-07-26 Thread coder.maliubiao

New submission from coder.maliubiao maliub...@gmail.com:

the code:
import os,stat
mode=os.stat(a broken link file).st_mode
then i got :OSError: [Errno 2] No such file or directory.

why not just treat a broken link as something existing and don't report any 
error.

--
components: Library (Lib)
messages: 166519
nosy: maliub...@gmail.com
priority: normal
severity: normal
status: open
title: os.stat() 's inappropriate behavior when dealing with a broken link in 
linux systems.
type: behavior
versions: Python 2.7

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



[issue15461] os.stat() 's inappropriate behavior when dealing with a broken link in linux systems.

2012-07-26 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Because we are doing what the linux stat call (and command) does .  See man 
stat.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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