From 5451ff490c18f3caffe127ec36260edf90b422c6 Mon Sep 17 00:00:00 2001 From: "roberto@sirius" Date: Thu, 25 Mar 2010 17:17:33 +0100 Subject: [PATCH] fix errno in tests.iobound_async --- tests/iobound_async.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/iobound_async.py b/tests/iobound_async.py index 7f0a4465..11b078a1 100644 --- a/tests/iobound_async.py +++ b/tests/iobound_async.py @@ -1,5 +1,6 @@ import socket import select +import errno def send_request(env, client): @@ -28,11 +29,11 @@ def application(env, start_response): #yield "" c = s.connect_ex(('www.google.it', 80)) - if c == 115: + if c in errno.EINPROGRESS: yield env['x-wsgiorg.fdevent.writable'](s.fileno(), 10) for r in send_request(env, s): yield r - elif c == 0: + elif c in errno.EISCONN: for r in send_request(env, s): yield r else: