eric6/E5Network/E5SslCertificatesDialog.py

changeset 8243
cc717c2ae956
parent 8240
93b8a353c4bf
--- a/eric6/E5Network/E5SslCertificatesDialog.py	Thu Apr 15 16:52:05 2021 +0200
+++ b/eric6/E5Network/E5SslCertificatesDialog.py	Thu Apr 15 18:11:24 2021 +0200
@@ -131,7 +131,7 @@
         """
         Private slot to show data of the selected server certificate.
         """
-        try:
+        with contextlib.suppress(ImportError):
             from E5Network.E5SslCertificatesInfoDialog import (
                 E5SslCertificatesInfoDialog
             )
@@ -140,8 +140,6 @@
                     0, self.CertRole))
             dlg = E5SslCertificatesInfoDialog(cert, self)
             dlg.exec()
-        except ImportError:
-            pass
     
     @pyqtSlot()
     def on_serversDeleteButton_clicked(self):
@@ -339,7 +337,7 @@
         """
         Private slot to show data of the selected CA certificate.
         """
-        try:
+        with contextlib.suppress(ImportError):
             from E5Network.E5SslCertificatesInfoDialog import (
                 E5SslCertificatesInfoDialog
             )
@@ -347,8 +345,6 @@
                 self.caCertificatesTree.currentItem().data(0, self.CertRole))
             dlg = E5SslCertificatesInfoDialog(cert, self)
             dlg.exec()
-        except ImportError:
-            pass
     
     @pyqtSlot()
     def on_caDeleteButton_clicked(self):

eric ide

mercurial