From a47b75b0a0e2fc7ee396bb317cd601ecec96f923 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 4 Jan 2008 15:48:06 +0000 Subject: socket.ioctl is only available on Windows --- Lib/socket.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/socket.py') diff --git a/Lib/socket.py b/Lib/socket.py index 7ce28699c9..6b4b743f68 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -141,7 +141,10 @@ _socketmethods = ( 'bind', 'connect', 'connect_ex', 'fileno', 'listen', 'getpeername', 'getsockname', 'getsockopt', 'setsockopt', 'sendall', 'setblocking', - 'settimeout', 'gettimeout', 'shutdown', 'ioctl') + 'settimeout', 'gettimeout', 'shutdown') + +if os.name == "nt": + _socketmethods = _socketmethods + ('ioctl',) if sys.platform == "riscos": _socketmethods = _socketmethods + ('sleeptaskw',) -- cgit v1.2.1