Skip to content

Commit 508f5ac

Browse files
committed
Fixed last minute corner case uncovered by latest mypy
1 parent 609fb2b commit 508f5ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfexs_backend/utils/docker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_fat_manifest_and_response(
9797
headersFATV2 = {"Accept": DockerFAT_schema2_mimetype}
9898
r = self._request(http_method, "manifests/" + alias, headers=headersFATV2) # type: ignore[no-untyped-call]
9999
except requests.exceptions.HTTPError as he:
100-
if he.response.status_code != 404:
100+
if he.response is None or he.response.status_code != 404:
101101
raise he
102102

103103
headersV2 = {"Accept": DockerManifestV2MIMEType}
@@ -113,7 +113,7 @@ def get_parsed_manifest_and_dcd(
113113
try:
114114
manifest, r = self.get_manifest_and_response(alias)
115115
except requests.exceptions.HTTPError as he:
116-
if he.response.status_code != 404:
116+
if he.response is None or he.response.status_code != 404:
117117
raise he
118118

119119
return None, None

0 commit comments

Comments
 (0)