summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-01 21:16:54 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-01 21:16:54 (GMT)
commitbd9c6d097ec98661adfd337b1a9ded640bc28c8e (patch)
treef2c9c14479c4608d6622a09976c522f5e3c910b1 /Lib/asyncore.py
parent77925b067d2654f852d027f2d23760d639dd9422 (diff)
downloadcpython-bd9c6d097ec98661adfd337b1a9ded640bc28c8e.zip
cpython-bd9c6d097ec98661adfd337b1a9ded640bc28c8e.tar.gz
cpython-bd9c6d097ec98661adfd337b1a9ded640bc28c8e.tar.bz2
Merged revisions 83201 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r83201 | georg.brandl | 2010-07-28 10:19:35 +0200 (Mi, 28 Jul 2010) | 1 line #9354: Provide getsockopt() in asyncore file_wrapper(). Patch by Lukas Langa. ........
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 44e8918..f066e76 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -598,6 +598,14 @@ if os.name == 'posix':
def send(self, *args):
return os.write(self.fd, *args)
+ def getsockopt(self, level, optname, buflen=None):
+ if (level == socket.SOL_SOCKET and
+ optname == socket.SO_ERROR and
+ not buflen):
+ return 0
+ raise NotImplementedError("Only asyncore specific behaviour "
+ "implemented.")
+
read = recv
write = send