summaryrefslogtreecommitdiff
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorJosiah Carlson <josiah.carlson@gmail.com>2008-06-10 15:58:19 +0000
committerJosiah Carlson <josiah.carlson@gmail.com>2008-06-10 15:58:19 +0000
commit750daccfc6fcbd66331732421d80027dd1086254 (patch)
tree495c68e6dd36e9443035052525236cdf6b6d278b /Lib/asyncore.py
parent0e86f041d87de1e44c513e81a597e8340f2df2eb (diff)
downloadcpython-750daccfc6fcbd66331732421d80027dd1086254.tar.gz
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 184c993d5e..305d8957de 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()