5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to select a SSL certificate. |
7 Module implementing a dialog to select a SSL certificate. |
8 """ |
8 """ |
9 |
9 |
|
10 import contextlib |
|
11 |
10 from PyQt5.QtCore import pyqtSlot, Qt |
12 from PyQt5.QtCore import pyqtSlot, Qt |
11 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem |
13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem |
12 try: |
14 with contextlib.suppress(ImportError): |
13 from PyQt5.QtNetwork import QSslCertificate |
15 from PyQt5.QtNetwork import QSslCertificate |
14 except ImportError: |
|
15 pass |
|
16 |
16 |
17 from .Ui_E5SslCertificateSelectionDialog import ( |
17 from .Ui_E5SslCertificateSelectionDialog import ( |
18 Ui_E5SslCertificateSelectionDialog |
18 Ui_E5SslCertificateSelectionDialog |
19 ) |
19 ) |
20 |
20 |