diff options
| author | Kevin Littlejohn <kevin@littlejohn.id.au> | 2014-07-31 11:08:39 +1000 |
|---|---|---|
| committer | Kevin Littlejohn <kevin@littlejohn.id.au> | 2014-07-31 11:08:39 +1000 |
| commit | e607eaa19cfa56b08b9965085d210ed8312f3fb0 (patch) | |
| tree | f0bc30850740637cb17506a23f6665db22ecc2f6 /docker/utils | |
| parent | 18758430d09c0d697558211f6201fb7a3d4e73b4 (diff) | |
| download | docker-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.py | 2 |
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: |
