[Python-checkins] cpython: Use new new stat.S_ISDOOR() function, instead of hardcoded mask
victor.stinner
python-checkins at python.org
Thu Aug 22 01:59:07 CEST 2013
http://hg.python.org/cpython/rev/fed15a462aa5
changeset: 85307:fed15a462aa5
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Aug 22 01:58:04 2013 +0200
summary:
Use new new stat.S_ISDOOR() function, instead of hardcoded mask
files:
Lib/test/subprocessdata/fd_status.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/test/subprocessdata/fd_status.py b/Lib/test/subprocessdata/fd_status.py
--- a/Lib/test/subprocessdata/fd_status.py
+++ b/Lib/test/subprocessdata/fd_status.py
@@ -3,6 +3,7 @@
import errno
import os
+import stat
try:
_MAXFD = os.sysconf("SC_OPEN_MAX")
@@ -19,6 +20,6 @@
continue
raise
# Ignore Solaris door files
- if st.st_mode & 0xF000 != 0xd000:
+ if not stat.S_ISDOOR(st.st_mode):
fds.append(fd)
print(','.join(map(str, fds)))
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list