xiekeyang / oci-discovery

Contain the OCI Ref-engine Discovery specification and related specifications as an extention to the image specification.
Other
2 stars 1 forks source link

oci_discovery/ref_engine_discovery: Catch HTTPError for ref_engine.resolve #6

Closed wking closed 7 years ago

wking commented 7 years ago

Instead of catching URLError. URLError is for protocol-level issues (e.g. wrapping an SSLError if you attempt an HTTPS connection to a server that does not speak TLS). They do not have much structure.

HTTPError, on the other hand, is for things like 400 errors and they do support things like geturl.

xiekeyang commented 7 years ago

LGTM