summaryrefslogtreecommitdiff
path: root/docker/utils
diff options
context:
space:
mode:
authorKevin Littlejohn <kevin@littlejohn.id.au>2014-07-31 11:08:39 +1000
committerKevin Littlejohn <kevin@littlejohn.id.au>2014-07-31 11:08:39 +1000
commite607eaa19cfa56b08b9965085d210ed8312f3fb0 (patch)
treef0bc30850740637cb17506a23f6665db22ecc2f6 /docker/utils
parent18758430d09c0d697558211f6201fb7a3d4e73b4 (diff)
downloaddocker-py-e607eaa19cfa56b08b9965085d210ed8312f3fb0.tar.gz
Added a timeout to the https ping
For those not using https who might have it firewalled, this request without a timeout causes significant delay. Adding a moderately generous timeout shouldn't affect anyone negatively, but will make things a bit nicer otherwise.
Diffstat (limited to 'docker/utils')
-rw-r--r--docker/utils/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index bf2bbc3..fb05a1e 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -101,7 +101,7 @@ def compare_version(v1, v2):
def ping(url):
try:
- res = requests.get(url)
+ res = requests.get(url, timeout=3)
except Exception:
return False
else: