MqttMonitor/MqttConnectionProfilesDialog.py

changeset 78
a22328182bc2
parent 66
9297e94d7d77
child 84
044df16e55aa
--- a/MqttMonitor/MqttConnectionProfilesDialog.py	Thu May 28 17:36:58 2020 +0200
+++ b/MqttMonitor/MqttConnectionProfilesDialog.py	Tue Jun 23 19:26:33 2020 +0200
@@ -7,13 +7,13 @@
 Module implementing a dialog to edit the MQTT connection profiles.
 """
 
-from __future__ import unicode_literals
-
 import collections
 
 from PyQt5.QtCore import pyqtSlot, Qt, QUuid
-from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton, \
-    QListWidgetItem, QInputDialog, QLineEdit
+from PyQt5.QtWidgets import (
+    QDialog, QDialogButtonBox, QAbstractButton, QListWidgetItem, QInputDialog,
+    QLineEdit
+)
 
 from E5Gui import E5MessageBox
 from E5Gui.E5PathPicker import E5PathPickerModes
@@ -268,12 +268,12 @@
             if self.tlsCertsFileButton.isChecked():
                 profile["TlsCaCert"] = self.tlsCertsFilePicker.text()
             elif self.tlsSelfSignedCertsButton.isChecked():
-                profile["TlsCaCert"] = \
-                    self.tlsSelfSignedCertsFilePicker.text()
-                profile["TlsClientCert"] = \
-                    self.tlsSelfSignedClientCertFilePicker.text()
-                profile["TlsClientKey"] = \
-                    self.tlsSelfSignedClientKeyFilePicker.text()
+                profile["TlsCaCert"] = (
+                    self.tlsSelfSignedCertsFilePicker.text())
+                profile["TlsClientCert"] = (
+                    self.tlsSelfSignedClientCertFilePicker.text())
+                profile["TlsClientKey"] = (
+                    self.tlsSelfSignedClientKeyFilePicker.text())
         
         self.__profiles[profileName] = profile
         self.__profilesChanged = True
@@ -473,8 +473,10 @@
         
         # condition 2: if client ID is empty, clean session must be selected
         if not self.__populatingProfile:
-            if self.clientIdEdit.text() == "" and \
-                    not self.cleanSessionCheckBox.isChecked():
+            if (
+                self.clientIdEdit.text() == "" and
+                not self.cleanSessionCheckBox.isChecked()
+            ):
                 enable = False
                 E5MessageBox.critical(
                     self,

eric ide

mercurial