Yury Selivanov <[email protected]> added the comment:
> You can easily work around your problem by replacing "sock.type ==
> SOCK_STREAM" with "sock.type & SOCK_STREAM == SOCK_STREAM".
Heh :) No, that would be a buggy code. Try this on your Linux box:
(socket.SOCK_SEQPACKET & socket.SOCK_STREAM) == socket.SOCK_STREAM
The _only_ way of checking socket type reliably is to explicitly reset
SOCK_NONBLOCK and SOCK_CLOEXEC or to apply 0xF mask on Linux, and don't do that
on other platforms.
That's why I think it's important to fix this one way or another.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32331>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com