eric6/E5Network/E5SslCertificateSelectionDialog.py

changeset 8243
cc717c2ae956
parent 8240
93b8a353c4bf
child 8257
28146736bbfc
equal deleted inserted replaced
8242:aa713ac50c0d 8243:cc717c2ae956
112 @pyqtSlot() 112 @pyqtSlot()
113 def on_viewButton_clicked(self): 113 def on_viewButton_clicked(self):
114 """ 114 """
115 Private slot to show data of the selected certificate. 115 Private slot to show data of the selected certificate.
116 """ 116 """
117 try: 117 with contextlib.suppress(ImportError):
118 from E5Network.E5SslCertificatesInfoDialog import ( 118 from E5Network.E5SslCertificatesInfoDialog import (
119 E5SslCertificatesInfoDialog 119 E5SslCertificatesInfoDialog
120 ) 120 )
121 cert = QSslCertificate.fromData( 121 cert = QSslCertificate.fromData(
122 self.certificatesTree.selectedItems()[0].data( 122 self.certificatesTree.selectedItems()[0].data(
123 0, self.CertRole)) 123 0, self.CertRole))
124 dlg = E5SslCertificatesInfoDialog(cert, self) 124 dlg = E5SslCertificatesInfoDialog(cert, self)
125 dlg.exec() 125 dlg.exec()
126 except ImportError:
127 pass
128 126
129 def getSelectedCertificate(self): 127 def getSelectedCertificate(self):
130 """ 128 """
131 Public method to get the selected certificate. 129 Public method to get the selected certificate.
132 130

eric ide

mercurial