diff -r 331569d44b19 -r 684261ef2165 eric6/E5Network/E5SslCertificatesDialog.py --- a/eric6/E5Network/E5SslCertificatesDialog.py Sun Sep 01 17:44:33 2019 +0200 +++ b/eric6/E5Network/E5SslCertificatesDialog.py Sun Sep 01 19:40:53 2019 +0200 @@ -26,7 +26,6 @@ import Utilities import UI.PixmapCache import Globals -from Globals import qVersionTuple class E5SslCertificatesDialog(QDialog, Ui_E5SslCertificatesDialog): @@ -87,16 +86,10 @@ @param cert certificate to insert (QSslCertificate) """ # step 1: extract the info to be shown - if qVersionTuple() >= (5, 0, 0): - organisation = Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.Organization))) - commonName = Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) - else: - organisation = Utilities.decodeString( - cert.subjectInfo(QSslCertificate.Organization)) - commonName = Utilities.decodeString( - cert.subjectInfo(QSslCertificate.CommonName)) + organisation = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.Organization))) + commonName = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) if organisation is None or organisation == "": organisation = self.tr("(Unknown)") if commonName is None or commonName == "": @@ -216,12 +209,8 @@ pems = QByteArray() for cert in certs: if cert in sCerts: - if qVersionTuple() >= (5, 0, 0): - commonStr = ", ".join( - cert.subjectInfo(QSslCertificate.CommonName)) - else: - commonStr = cert.subjectInfo( - QSslCertificate.CommonName) + commonStr = ", ".join( + cert.subjectInfo(QSslCertificate.CommonName)) E5MessageBox.warning( self, self.tr("Import Certificate"), @@ -300,16 +289,10 @@ @param cert certificate to insert (QSslCertificate) """ # step 1: extract the info to be shown - if qVersionTuple() >= (5, 0, 0): - organisation = Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.Organization))) - commonName = Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) - else: - organisation = Utilities.decodeString( - cert.subjectInfo(QSslCertificate.Organization)) - commonName = Utilities.decodeString( - cert.subjectInfo(QSslCertificate.CommonName)) + organisation = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.Organization))) + commonName = Utilities.decodeString( + ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) if organisation is None or organisation == "": organisation = self.tr("(Unknown)") if commonName is None or commonName == "": @@ -407,12 +390,8 @@ caCerts = self.__getSystemCaCertificates() for cert in certs: if cert in caCerts: - if qVersionTuple() >= (5, 0, 0): - commonStr = ", ".join( - cert.subjectInfo(QSslCertificate.CommonName)) - else: - commonStr = cert.subjectInfo( - QSslCertificate.CommonName) + commonStr = ", ".join( + cert.subjectInfo(QSslCertificate.CommonName)) E5MessageBox.warning( self, self.tr("Import Certificate"),