diff options
author | Gael Pasgrimaud <gael@gawel.org> | 2014-09-19 15:17:18 +0200 |
---|---|---|
committer | Gael Pasgrimaud <gael@gawel.org> | 2014-09-19 15:17:18 +0200 |
commit | 56b430aab96bd20bc4b4b29bd27c1ccb82ec8e27 (patch) | |
tree | cae70082a0f34b3cc6141b7d6d486411c85e8f70 | |
parent | 6581ebfe7e1f95b6f2e193723a9e0e1f02337851 (diff) | |
download | webtest-56b430aab96bd20bc4b4b29bd27c1ccb82ec8e27.tar.gz |
avoid weird bug when conn is not really established
-rw-r--r-- | webtest/http.py | 2 |
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 |