Signed-off-by: Patrick Uiterwijk puiterwijk@redhat.com
The original message is: Error: [('SSL routines', 'SSL_shutdown', 'shutdown while in init')]
This one at least gives some indication where users should be looking.
This code looks likely to break on different systems. See the is_cert_error() func, which this code probably overlaps with.
We could maybe just raise your error in the ssl.SSLCommon.is_cert_error(e) block, but I'm really not sure about masking the true exception in the traceback. Perhaps what we really need is some UI friendliness about exceptions, similar to what we do with explainError in the web ui.
Two notes: * Error is not directly connected to invalid certificate - it is only one of places where it manifests. Underlying issue is that already closed socket is closed again. See https://pagure.io/koji/issue/32#comment-23181 When that problem is fixed, error is giving right "certificate expired" message. * Maybe we can merge it with https://pagure.io/fork/tkopecek/koji/commits/issue32 * Not sure if we want to put that message to is_cert_error (or new is_already_closed_error) in given branch. Sometimes it is valid that such exception is masked with these functions, so error message would be more confusing.
This code is no longer needed with the new requests code.
Pull-Request has been closed by puiterwijk
Signed-off-by: Patrick Uiterwijk puiterwijk@redhat.com