summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2013-03-06 06:18:02 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2013-03-07 04:32:20 -0500
commit55fc6e72e8ba50c863057161c06169035edc0698 (patch)
tree636fe607a73d6ecb4a97ef264fca423a424d0c6d /tests
parent06ae798c30d992b255f28e4bfd3aba64b1d2ac95 (diff)
downloadpycurl-55fc6e72e8ba50c863057161c06169035edc0698.tar.gz
Python 2.5 compatibility: except as
Diffstat (limited to 'tests')
-rw-r--r--tests/runwsgi.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/runwsgi.py b/tests/runwsgi.py
index 5217a3f..8a978ec 100644
--- a/tests/runwsgi.py
+++ b/tests/runwsgi.py
@@ -1,5 +1,6 @@
# Run a WSGI application in a daemon thread
+import sys
import bottle
import threading
import socket
@@ -21,7 +22,8 @@ def wait_for_network_service(netloc, check_interval, num_attempts):
for i in range(num_attempts):
try:
conn = socket.create_connection(netloc, check_interval)
- except socket.error as e:
+ except socket.error:
+ e = sys.exc_info()[1]
_time.sleep(check_interval)
else:
conn.close()