[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 ___

[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:

[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