Wed, 14 Oct 2020 19:15:45 +0200
Changed calls of exec_() into exec().
--- a/ChangeLog Thu Jun 25 19:13:06 2020 +0200 +++ b/ChangeLog Wed Oct 14 19:15:45 2020 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 2.1.0: +- changed exec_() into exec() + Version 2.0.1: - updated Russian translations
--- a/MqttMonitor/MqttMonitorWidget.py Thu Jun 25 19:13:06 2020 +0200 +++ b/MqttMonitor/MqttMonitorWidget.py Wed Oct 14 19:15:45 2020 +0200 @@ -446,7 +446,7 @@ dlg = MqttConnectionProfilesDialog( self.__client, self.__plugin.getPreferences("BrokerProfiles"), parent=self) - if dlg.exec_() == QDialog.Accepted: + if dlg.exec() == QDialog.Accepted: profilesDict = dlg.getProfiles() self.__plugin.setPreferences("BrokerProfiles", profilesDict) self.__populateProfileComboBox() @@ -456,7 +456,7 @@ ) dlg = MqttConnectionOptionsDialog( self.__client, self.__connectionOptions, parent=self) - if dlg.exec_() == QDialog.Accepted: + if dlg.exec() == QDialog.Accepted: self.__connectionOptions = dlg.getConnectionOptions() if self.__connectionOptions["TlsEnable"]: port = self.brokerPortComboBox.currentText().strip() @@ -564,9 +564,8 @@ ): # payload size limit is 268,435,455 bytes try: - f = open(payloadFile, "rb") - payloadStr = f.read() - f.close() + with open(payloadFile, "rb") as f: + payloadStr = f.read() except EnvironmentError as err: E5MessageBox.critical( self, @@ -677,9 +676,8 @@ fn = Utilities.toNativeSeparators(fn) try: - f = open(fn, "w") - f.write(self.messagesEdit.toPlainText()) - f.close() + with open(fn, "w") as f: + f.write(self.messagesEdit.toPlainText()) except EnvironmentError as err: E5MessageBox.critical( self, @@ -734,9 +732,8 @@ fn = Utilities.toNativeSeparators(fn) try: - f = open(fn, "w") - f.write(self.logEdit.toPlainText()) - f.close() + with open(fn, "w") as f: + f.write(self.logEdit.toPlainText()) except EnvironmentError as err: E5MessageBox.critical( self,
--- a/PluginMqttMonitor.py Thu Jun 25 19:13:06 2020 +0200 +++ b/PluginMqttMonitor.py Wed Oct 14 19:15:45 2020 +0200 @@ -24,7 +24,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.0.1" +version = "2.1.0" className = "MqttMonitorPlugin" packageName = "MqttMonitor" shortDescription = "Plug-in implementing a tool to connect to a MQTT broker"