Fix an issue with "'NoneType' object has no attribute 'status_code'"

This commit is contained in:
Ivan Kravets committed 2020-10-16 14:23:10 +03:00
1 parent a870981266
commit ee847e03a6
1 file changed
+1 -1
+1 -1
View File
@@ -142,6 +142,6 @@ class RegistryClient(HTTPClient):
cache_valid="1h",
)
except HTTPClientError as e:
if e.response.status_code == 404:
if e.response and e.response.status_code == 404:
return None
raise e