summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGael Pasgrimaud <gael@gawel.org>2014-09-19 15:17:18 +0200
committerGael Pasgrimaud <gael@gawel.org>2014-09-19 15:17:18 +0200
commit56b430aab96bd20bc4b4b29bd27c1ccb82ec8e27 (patch)
treecae70082a0f34b3cc6141b7d6d486411c85e8f70
parent6581ebfe7e1f95b6f2e193723a9e0e1f02337851 (diff)
downloadwebtest-56b430aab96bd20bc4b4b29bd27c1ccb82ec8e27.tar.gz
avoid weird bug when conn is not really established
-rw-r--r--webtest/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/webtest/http.py b/webtest/http.py
index 90959ec..890ef96 100644
--- a/webtest/http.py
+++ b/webtest/http.py
@@ -30,10 +30,10 @@ def check_server(host, port, path_info='/', timeout=3, retries=30):
"""Perform a request until the server reply"""
if retries < 0:
return 0
- conn = http_client.HTTPConnection(host, port, timeout=timeout)
time.sleep(.3)
for i in range(retries):
try:
+ conn = http_client.HTTPConnection(host, int(port), timeout=timeout)
conn.request('GET', path_info)
res = conn.getresponse()
return res.status