diff Lib/socket.py @ 44478:73bc002252bf legacy-trunk

socket.ioctl is only available on Windows
author Christian Heimes <christian@cheimes.de>
date Fri, 04 Jan 2008 15:48:06 +0000
parents bfed70277ab3
children 4eb5a667c882
line wrap: on
line diff
--- a/Lib/socket.py	Fri Jan 04 15:34:06 2008 +0000
+++ b/Lib/socket.py	Fri Jan 04 15:48:06 2008 +0000
@@ -141,7 +141,10 @@
     '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',)