Skip to content

Commit

Permalink
Fix network address/channel parsing (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogimenez-wirepas authored Sep 10, 2024
1 parent c7f0f9e commit 5d27c52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wirepas_provisioning_server/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ def __init__(self, config: Optional[str] = None):
else:
raise ProvisioningDataException(f"Invalid data config file. Node {node_name} must include UID information")

if "network_address" in node_cfg.keys():
if "address" in cfg["networks"][network_name].keys():
network_address = convert_to_int(cfg["networks"][network_name]["address"])
else:
network_address = None

if "network_channel" in node_cfg.keys():
if "channel" in cfg["networks"][network_name].keys():
network_channel = convert_to_int(cfg["networks"][network_name]["channel"])
else:
network_channel = None
Expand Down

0 comments on commit 5d27c52

Please sign in to comment.