diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-08-21 23:58:04 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-08-21 23:58:04 (GMT) |
commit | 0f24b879c9ac489a433d6b5f367dcb0553b9abdc (patch) | |
tree | df0950a794cc320ae7c861bddcfa7ea1d064e21f | |
parent | e0bb0c9c14cd0d29e62534afb9e3cd4ca41f21d7 (diff) | |
download | cpython-0f24b879c9ac489a433d6b5f367dcb0553b9abdc.zip cpython-0f24b879c9ac489a433d6b5f367dcb0553b9abdc.tar.gz cpython-0f24b879c9ac489a433d6b5f367dcb0553b9abdc.tar.bz2 |
Use new new stat.S_ISDOOR() function, instead of hardcoded mask
-rw-r--r-- | 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 index 1f61e13..877512a 100644 --- a/Lib/test/subprocessdata/fd_status.py +++ b/Lib/test/subprocessdata/fd_status.py @@ -3,6 +3,7 @@ file descriptors on stdout.""" import errno import os +import stat try: _MAXFD = os.sysconf("SC_OPEN_MAX") @@ -19,6 +20,6 @@ if __name__ == "__main__": 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))) |