From: Victor Stinner Date: Wed, 21 Aug 2013 23:58:04 +0000 (+0200) Subject: Use new new stat.S_ISDOOR() function, instead of hardcoded mask X-Git-Tag: v3.4.0a2~162 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f24b879c9ac489a433d6b5f367dcb0553b9abdc;p=python Use new new stat.S_ISDOOR() function, instead of hardcoded mask --- diff --git a/Lib/test/subprocessdata/fd_status.py b/Lib/test/subprocessdata/fd_status.py index 1f61e13a34..877512a36e 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)))