eric6/WebBrowser/Network/SslErrorExceptionsDialog.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8243
cc717c2ae956
--- a/eric6/WebBrowser/Network/SslErrorExceptionsDialog.py	Fri Apr 02 11:59:41 2021 +0200
+++ b/eric6/WebBrowser/Network/SslErrorExceptionsDialog.py	Sat May 01 14:27:20 2021 +0200
@@ -27,7 +27,7 @@
         @param parent reference to the parent widget
         @type QWidget
         """
-        super(SslErrorExceptionsDialog, self).__init__(parent)
+        super().__init__(parent)
         self.setupUi(self)
         
         self.__errorDescriptions = {
@@ -68,28 +68,14 @@
             .CertificateNameConstraintViolation:
                 self.tr("The certificate claimed DNS names that are in"
                         " violation of name constraints."),
+            QWebEngineCertificateError.Error.CertificateValidityTooLong:
+                self.tr("The certificate has a validity period that is"
+                        " too long."),
+            QWebEngineCertificateError.Error.CertificateTransparencyRequired:
+                self.tr("Certificate Transparency was required for this"
+                        " connection, but the server did not provide"
+                        " information that complied with the policy."),
         }
-        try:
-            self.__errorDescriptions[
-                QWebEngineCertificateError.Error.CertificateValidityTooLong
-            ] = self.tr(
-                "The certificate has a validity period that is too long."
-            )
-        except AttributeError:
-            # the value was added in Qt 5.7
-            pass
-        try:
-            self.__errorDescriptions[
-                QWebEngineCertificateError.Error
-                .CertificateTransparencyRequired
-            ] = self.tr(
-                "Certificate Transparency was required for this"
-                " connection, but the server did not provide"
-                " information that complied with the policy."
-            )
-        except AttributeError:
-            # the value was added in Qt 5.8
-            pass
         
         for host, errors in errorsDict.items():
             itm = QTreeWidgetItem(self.errorsTree, [host])

eric ide

mercurial