summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/utils/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 8fd9e94..2b53439 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -57,9 +57,10 @@ def compare_version(v1, v2):
def ping(url):
try:
res = requests.get(url)
- return res.status >= 400
except Exception:
return False
+ else:
+ return res.status_code < 400
def _convert_port_binding(binding):