E5Network/E5SslCertificatesDialog.py

changeset 2401
4f428de32b69
parent 2363
d5d006a038a4
child 2432
b1a2f9054b28
--- a/E5Network/E5SslCertificatesDialog.py	Sun Feb 10 14:48:24 2013 +0100
+++ b/E5Network/E5SslCertificatesDialog.py	Sun Feb 10 15:17:59 2013 +0100
@@ -19,11 +19,6 @@
 
 from .Ui_E5SslCertificatesDialog import Ui_E5SslCertificatesDialog
 
-try:
-    from E5Network.E5SslInfoDialog import E5SslInfoDialog
-except ImportError:
-    pass
-
 import Preferences
 import Utilities
 import UI.PixmapCache
@@ -125,10 +120,14 @@
         """
         Private slot to show data of the selected server certificate.
         """
-        cert = QSslCertificate.fromData(
-            self.serversCertificatesTree.currentItem().data(0, self.CertRole))[0]
-        dlg = E5SslInfoDialog(cert, self)
-        dlg.exec_()
+        try:
+            from E5Network.E5SslInfoDialog import E5SslInfoDialog
+            cert = QSslCertificate.fromData(
+                self.serversCertificatesTree.currentItem().data(0, self.CertRole))[0]
+            dlg = E5SslInfoDialog(cert, self)
+            dlg.exec_()
+        except ImportError:
+            pass
     
     @pyqtSlot()
     def on_serversDeleteButton_clicked(self):
@@ -318,10 +317,14 @@
         """
         Private slot to show data of the selected CA certificate.
         """
-        cert = QSslCertificate.fromData(
-            self.caCertificatesTree.currentItem().data(0, self.CertRole))[0]
-        dlg = E5SslInfoDialog(cert, self)
-        dlg.exec_()
+        try:
+            from E5Network.E5SslInfoDialog import E5SslInfoDialog
+            cert = QSslCertificate.fromData(
+                self.caCertificatesTree.currentItem().data(0, self.CertRole))[0]
+            dlg = E5SslInfoDialog(cert, self)
+            dlg.exec_()
+        except ImportError:
+            pass
     
     @pyqtSlot()
     def on_caDeleteButton_clicked(self):

eric ide

mercurial