This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2013-05-06.09:11:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367831480.84.0.461149512803.issue17913@psf.upfronthosting.co.za>
In-reply-to
Content
The function stat.filemode() has a fallback to "-" for file type when it is unable to properly detect the type of a file. This gives wrong results for any file type that is not in the lookup table.

For example it doesn't check for S_ISSOCK:

>>> s = os.stat("/var/run/sdp") t
>>> stat.filemode(s.st_mode)
'-rw-rw-rw-'
$ ls -la /var/run/sdp
srw-rw-rw- 1 root root 0 Mai  2 16:08 /var/run/sdp

Also see #11016 for more file types.

I'm going to work on the matter soonish.
History
Date User Action Args
2013-05-06 09:11:20christian.heimessetrecipients: + christian.heimes
2013-05-06 09:11:20christian.heimessetmessageid: <1367831480.84.0.461149512803.issue17913@psf.upfronthosting.co.za>
2013-05-06 09:11:20christian.heimeslinkissue17913 messages
2013-05-06 09:11:20christian.heimescreate