summaryrefslogtreecommitdiffstats
path: root/Lib/socket.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-04 15:48:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-04 15:48:06 (GMT)
commita47b75b0a0e2fc7ee396bb317cd601ecec96f923 (patch)
tree20f180ed64af3ae1ccba9d8adddf6089d069f56b /Lib/socket.py
parentaee643b01fe4cb3993efcc2e06639e5cbf684c94 (diff)
downloadcpython-a47b75b0a0e2fc7ee396bb317cd601ecec96f923.zip
cpython-a47b75b0a0e2fc7ee396bb317cd601ecec96f923.tar.gz
cpython-a47b75b0a0e2fc7ee396bb317cd601ecec96f923.tar.bz2
socket.ioctl is only available on Windows
Diffstat (limited to 'Lib/socket.py')
-rw-r--r--Lib/socket.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/socket.py b/Lib/socket.py
index 7ce2869..6b4b743 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',)