# HG changeset patch # User Edouard Tisserant # Date 1599824801 -7200 # Node ID 4de6a587f7f938e32f3734a79f9cdccaf1858669 # Parent 7f67a7f6bfcc7bd120f5d99970254eaadaf24891 MODBUS: Fix saving of websettings. diff -r 7f67a7f6bfcc -r 4de6a587f7f9 modbus/web_settings.py --- a/modbus/web_settings.py Thu Sep 10 16:08:26 2020 +0200 +++ b/modbus/web_settings.py Fri Sep 11 13:46:41 2020 +0200 @@ -228,7 +228,7 @@ # This allows us to confirm the saved data contains the correct addr_type # when loading from file save_info = {} - save_info["addr_type"] = ["addr_type"] + save_info["addr_type"] = WebNode_entry["addr_type"] save_info["node_type"] = WebNode_entry["node_type"] save_info["config" ] = newConfig @@ -262,7 +262,7 @@ filename = _WebNodeList[WebNode_id]["filename"] try: #if os.path.isfile(filename): - save_info = json.load(open(filename)) + save_info = json.load(open(os.path.realpath(filename))) except Exception: return None