PluginMqttMonitor.py

branch
connection_profiles
changeset 18
bbfe5866b6aa
parent 10
7e0e921dc7ea
child 19
889a7c3c0e63
--- a/PluginMqttMonitor.py	Mon Sep 03 19:57:59 2018 +0200
+++ b/PluginMqttMonitor.py	Tue Sep 04 19:42:24 2018 +0200
@@ -94,6 +94,7 @@
         
         self.__defaults = {
             "RecentBrokersWithPort": "[]",      # JSON formatted empty list
+            "BrokerProfiles": "{}",             # JSON formatted empty dict
         }
         
         self.__translator = None
@@ -209,7 +210,7 @@
         @param key the key of the value to get
         @return the requested setting
         """
-        if key in ["RecentBrokersWithPort"]:
+        if key in ["RecentBrokersWithPort", "BrokerProfiles"]:
             return json.loads(Preferences.Prefs.settings.value(
                 self.PreferencesKey + "/" + key, self.__defaults[key]))
         else:
@@ -223,7 +224,7 @@
         @param key the key of the setting to be set (string)
         @param value the value to be set
         """
-        if key in ["RecentBrokersWithPort"]:
+        if key in ["RecentBrokersWithPort", "BrokerProfiles"]:
             Preferences.Prefs.settings.setValue(
                 self.PreferencesKey + "/" + key, json.dumps(value))
         else:

eric ide

mercurial