E5Network/E5SslCertificatesDialog.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3022
57179e4cdadd
child 3060
5883ce99ee12
--- a/E5Network/E5SslCertificatesDialog.py	Fri Oct 18 23:00:41 2013 +0200
+++ b/E5Network/E5SslCertificatesDialog.py	Fri Nov 01 15:48:48 2013 +0100
@@ -102,7 +102,8 @@
         expiryDate = cert.expiryDate().toString("yyyy-MM-dd")
         
         # step 2: create the entry
-        items = self.serversCertificatesTree.findItems(organisation,
+        items = self.serversCertificatesTree.findItems(
+            organisation,
             Qt.MatchFixedString | Qt.MatchCaseSensitive)
         if len(items) == 0:
             parent = QTreeWidgetItem(
@@ -149,7 +150,8 @@
         Private slot to delete the selected server certificate.
         """
         itm = self.serversCertificatesTree.currentItem()
-        res = E5MessageBox.yesNo(self,
+        res = E5MessageBox.yesNo(
+            self,
             self.trUtf8("Delete Server Certificate"),
             self.trUtf8("""<p>Shall the server certificate really be"""
                         """ deleted?</p><p>{0}</p>"""
@@ -185,7 +187,8 @@
                     certificateDict[server] = pems
                 else:
                     del certificateDict[server]
-            Preferences.Prefs.settings.setValue("Ssl/CaCertificatesDict",
+            Preferences.Prefs.settings.setValue(
+                "Ssl/CaCertificatesDict",
                 certificateDict)
             
             # delete the certificate from the default certificates
@@ -215,7 +218,8 @@
                     else:
                         commonStr = cert.subjectInfo(
                             QSslCertificate.CommonName)
-                    E5MessageBox.warning(self,
+                    E5MessageBox.warning(
+                        self,
                         self.trUtf8("Import Certificate"),
                         self.trUtf8(
                             """<p>The certificate <b>{0}</b> already exists."""
@@ -226,7 +230,8 @@
             if server not in certificateDict:
                 certificateDict[server] = QByteArray()
             certificateDict[server].append(pems)
-            Preferences.Prefs.settings.setValue("Ssl/CaCertificatesDict",
+            Preferences.Prefs.settings.setValue(
+                "Ssl/CaCertificatesDict",
                 certificateDict)
             
             self.serversCertificatesTree.clear()
@@ -308,7 +313,8 @@
         expiryDate = cert.expiryDate().toString("yyyy-MM-dd")
         
         # step 2: create the entry
-        items = self.caCertificatesTree.findItems(organisation,
+        items = self.caCertificatesTree.findItems(
+            organisation,
             Qt.MatchFixedString | Qt.MatchCaseSensitive)
         if len(items) == 0:
             parent = QTreeWidgetItem(self.caCertificatesTree, [organisation])
@@ -353,7 +359,8 @@
         Private slot to delete the selected CA certificate.
         """
         itm = self.caCertificatesTree.currentItem()
-        res = E5MessageBox.yesNo(self,
+        res = E5MessageBox.yesNo(
+            self,
             self.trUtf8("Delete CA Certificate"),
             self.trUtf8(
                 """<p>Shall the CA certificate really be deleted?</p>"""
@@ -401,7 +408,8 @@
                     else:
                         commonStr = cert.subjectInfo(
                             QSslCertificate.CommonName)
-                    E5MessageBox.warning(self,
+                    E5MessageBox.warning(
+                        self,
                         self.trUtf8("Import Certificate"),
                         self.trUtf8(
                             """<p>The certificate <b>{0}</b> already exists."""
@@ -455,7 +463,8 @@
                     if ex:
                         fname += ex
                 if QFileInfo(fname).exists():
-                    res = E5MessageBox.yesNo(self,
+                    res = E5MessageBox.yesNo(
+                        self,
                         self.trUtf8("Export Certificate"),
                         self.trUtf8("<p>The file <b>{0}</b> already exists."
                                     " Overwrite it?</p>").format(fname),
@@ -465,7 +474,8 @@
                 
                 f = QFile(fname)
                 if not f.open(QIODevice.WriteOnly):
-                    E5MessageBox.critical(self,
+                    E5MessageBox.critical(
+                        self,
                         self.trUtf8("Export Certificate"),
                         self.trUtf8(
                             """<p>The certificate could not be written"""
@@ -496,7 +506,8 @@
         if fname:
             f = QFile(fname)
             if not f.open(QIODevice.ReadOnly):
-                E5MessageBox.critical(self,
+                E5MessageBox.critical(
+                    self,
                     self.trUtf8("Export Certificate"),
                     self.trUtf8(
                         """<p>The certificate could not be read from file"""

eric ide

mercurial