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

coder.maliubiao report at bugs.python.org
Thu Jul 26 23:03:21 CEST 2012


New submission from coder.maliubiao <maliubiao at 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: maliubiao at 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 <report at bugs.python.org>
<http://bugs.python.org/issue15461>
_______________________________________


More information about the New-bugs-announce mailing list