From 66a5a0efd538e31a190ca6ecb775bc1dfc4ee232 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 29 Jul 2020 13:42:43 -0400 Subject: [PATCH] Replace SSLCertVerificationError with CertificateError for py36 This exception was added in python 3.7. Use CertificateError instead which is an alias and will work with older python releases. https://bugzilla.redhat.com/show_bug.cgi?id=1858318 Reviewed-By: Florence Blanc-Renaud --- ipaserver/install/server/upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py index 2c36bc0e2..2c1517865 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -667,7 +667,7 @@ def http_certificate_ensure_ipa_ca_dnsname(http): try: cert.match_hostname(expect) - except ssl.SSLCertVerificationError: + except ssl.CertificateError: if certs.is_ipa_issued_cert(api, cert): request_id = certmonger.get_request_id( {'cert-file': paths.HTTPD_CERT_FILE}) -- 2.26.2