romuald · GitHub

Feature or enhancement

Proposal:

Considering the following example

ctx = ssl.create_default_context()
ctx.load_cert_chain(maybe_no_exists, maybe_not_exists_also)
# -> FileNotFoundError: [Errno 2] No such file or directory

The current implementation returns a simple No such file or directory exception without information about the file itself

Since FileNotFoundError have a filename attribute that is correctly reported in its representation, it would be appreciable to have the filename attached to the exception being raised

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Read the original on github.com ↗