mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 15:13:52 +01:00
fix: Settings name translation has to check the existence of key
In the 'xml_setconfig' function, the names of the passed dictionary
are translated into new names. However, there is no obligation to
hand over all fields in the setting dict. This bugfix checks whether
the keys exist before translating.
Refs: 6d56c667
Signed-off-by: Sven Sager <akira@narux.de>
This commit is contained in:
@@ -1294,8 +1294,9 @@ class RevPiPyLoad:
|
||||
("plcslaveport", "plcserverport"),
|
||||
("plcslavewatchdog", "plcserverwatchdog"),
|
||||
):
|
||||
dc[key_to] = dc[key_from]
|
||||
del dc[key_from]
|
||||
if key_from in dc:
|
||||
dc[key_to] = dc[key_from]
|
||||
del dc[key_from]
|
||||
|
||||
# Werte übernehmen, die eine Definition in key haben (andere nicht)
|
||||
for sektion in keys:
|
||||
|
||||
Reference in New Issue
Block a user