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

2012-07-26 Thread Hynek Schlawack
Hynek Schlawack added the comment: For the sake of completeness: what you're looking for is os.lstat. -- nosy: +hynek ___ Python tracker ___

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

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