Skip to content

Commit

Permalink
Merge branch 'master' of github.com:markqvist/Reticulum
Browse files Browse the repository at this point in the history
  • Loading branch information
markqvist committed Dec 8, 2024
2 parents ed30fa3 + 8b08658 commit d4dd706
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions RNS/Interfaces/RNodeMultiInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,13 @@ def __init__(self, owner, configuration):
# Count how many interfaces are in the file
for subinterface in c:
# if the retrieved entry is not a string, it must be a dictionary, which is what we want
if not isinstance(c[subinterface], str):
if isinstance(c[subinterface], dict):
count += 1

# Count how many interfaces are enabled to allow for appropriate matrix sizing
for subinterface in c:
# if the retrieved entry is not a string, it must be a dictionary, which is what we want
if not isinstance(c[subinterface], str):
subinterface_config = self.config["interfaces"][name][subinterface]
if isinstance(c[subinterface], dict):
subinterface_config = c[subinterface]
if (("interface_enabled" in subinterface_config) and subinterface_config.as_bool("interface_enabled") == True) or (("enabled" in c) and c.as_bool("enabled") == True):
enabled_count += 1

Expand All @@ -213,9 +212,8 @@ def __init__(self, owner, configuration):
subint_index = 0

for subinterface in c:
# If the retrieved entry is not a string, it must be a dictionary, which is what we want
if not isinstance(c[subinterface], str):
subinterface_config = self.config["interfaces"][name][subinterface]
if isinstance(c[subinterface], dict):
subinterface_config = c[subinterface]
if (("interface_enabled" in subinterface_config) and subinterface_config.as_bool("interface_enabled") == True) or (("enabled" in c) and c.as_bool("enabled") == True):
subint_config[subint_index][0] = subinterface

Expand Down

0 comments on commit d4dd706

Please sign in to comment.