Fixed a few issues on Windows systems.

Sat, 09 Oct 2010 15:26:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 09 Oct 2010 15:26:36 +0200
changeset 664
3061f8bd826e
parent 661
f9d49e0c2522
child 665
a160ae15301c

Fixed a few issues on Windows systems.

Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
Helpviewer/Network/NetworkAccessManager.py file | annotate | diff | comparison | revisions
Helpviewer/SslInfoDialog.py file | annotate | diff | comparison | revisions
--- a/Helpviewer/HelpBrowserWV.py	Fri Oct 08 20:43:11 2010 +0200
+++ b/Helpviewer/HelpBrowserWV.py	Sat Oct 09 15:26:36 2010 +0200
@@ -335,6 +335,10 @@
         if self.__sslInfo is not None and self.__sslInfo.isValid():
             dlg = SslInfoDialog(self.__sslInfo, self.view())
             dlg.exec_()
+        else:
+            E5MessageBox.warning(self.view(), 
+                self.trUtf8("SSL Certificate Info"), 
+                self.trUtf8("""There is no SSL Certificate Info available."""))
 
 ##########################################################################################
 
--- a/Helpviewer/Network/NetworkAccessManager.py	Fri Oct 08 20:43:11 2010 +0200
+++ b/Helpviewer/Network/NetworkAccessManager.py	Sat Oct 09 15:26:36 2010 +0200
@@ -13,7 +13,8 @@
 from PyQt4.QtGui import QDialog
 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
 try:
-    from PyQt4.QtNetwork import QSsl, QSslCertificate, QSslConfiguration, QSslSocket
+    from PyQt4.QtNetwork import QSsl, QSslCertificate, QSslConfiguration, QSslSocket, \
+        QSslError
     SSL_AVAILABLE = True
 except ImportError:
     SSL_AVAILABLE = False
@@ -197,6 +198,8 @@
         
         errorStrings = []
         for err in errors:
+            if err.error() == QSslError.NoError:
+                continue
             if err.certificate() in caMerge:
                 continue
             errorStrings.append(err.errorString())
--- a/Helpviewer/SslInfoDialog.py	Fri Oct 08 20:43:11 2010 +0200
+++ b/Helpviewer/SslInfoDialog.py	Sat Oct 09 15:26:36 2010 +0200
@@ -67,6 +67,9 @@
         @return formated serial number (string)
         """
         serial = cert.serialNumber()
+        if serial == "":
+            return self.trUtf8("<not part of the certificate>")
+        
         if ':' in serial:
             return str(serial, encoding = "ascii").upper()
         else:

eric ide

mercurial