summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2015-06-19 22:36:23 +0200
committerJoffrey F <joffrey@docker.com>2015-06-19 22:36:23 +0200
commitd70aa1e45ca948e78faabf15b56a08ea7d4cc93d (patch)
tree0c8f12bb80be8c0c34ad05ea1d9f076290381337
parent7118b1fe5e70640e7a93a1bbcf0a9ae854acac66 (diff)
parente96ebf8c98579b1429b59aaaffc851675162eea1 (diff)
downloaddocker-py-d70aa1e45ca948e78faabf15b56a08ea7d4cc93d.tar.gz
Merge branch 'master' of https://github.com/cesanta/docker-py into cesanta-master
-rw-r--r--docker/utils/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index b322806..f79f7c2 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -129,7 +129,9 @@ def ping(url):
except Exception:
return False
else:
- return res.status_code < 400
+ # We don't send yet auth headers
+ # and a v2 registry will respond with status 401
+ return res.status_code == 401 or res.status_code < 400
def _convert_port_binding(binding):