Fix pinging an unauthenticated v2 registry

This commit is contained in:
Marko Mikulicic 2015-05-29 00:58:49 +02:00
parent be73aaf540
commit e96ebf8c98
1 changed files with 3 additions and 1 deletions

View File

@ -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):