summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorJosiah Carlson <josiah.carlson@gmail.com>2008-06-10 15:58:19 (GMT)
committerJosiah Carlson <josiah.carlson@gmail.com>2008-06-10 15:58:19 (GMT)
commitb67b53db51b470ba0740c97abc16e095ec0cfd28 (patch)
treeef4a479493cb31fd62c1bdae8167fc89ef9af12d /Lib/asyncore.py
parent1cec7aa7c73163d2ec3ca793ec76be698f4c6558 (diff)
downloadcpython-b67b53db51b470ba0740c97abc16e095ec0cfd28.zip
cpython-b67b53db51b470ba0740c97abc16e095ec0cfd28.tar.gz
cpython-b67b53db51b470ba0740c97abc16e095ec0cfd28.tar.bz2
Fixed test to reflect new filedispatcher semantics, as well as two
NameErrors pointed out by Giampaolo.
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 184c993..305d895 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -228,7 +228,7 @@ class dispatcher:
# passed be connected.
try:
self.addr = sock.getpeername()
- except socket.error:
+ except socket.error, err:
if err[0] == ENOTCONN:
# To handle the case where we got an unconnected
# socket.
@@ -424,7 +424,7 @@ class dispatcher:
#check for errors
err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
if err != 0:
- raise socket.error(err, strerror(err))
+ raise socket.error(err, _strerror(err))
self.handle_connect_event()
self.handle_write()