remove nested keys from nodes so we do not display garbage

This commit is contained in:
Mike Kinney
2022-01-02 11:15:19 -08:00
parent e7664cb40b
commit a915b05240
3 changed files with 31 additions and 8 deletions

View File

@@ -83,10 +83,10 @@ class MeshInterface:
nodes = ""
if self.nodes:
for n in self.nodes.values():
# when the TBeam is first booted, it sometimes shows the 'raw' data
# when the TBeam is first booted, it sometimes shows the raw data
# so, we will just remove any raw keys
n2 = remove_keys_from_dict('raw', n)
n2 = remove_keys_from_dict('decode', n2)
keys_to_remove = ('raw', 'decode', 'payload')
n2 = remove_keys_from_dict(keys_to_remove, n)
# if we have 'macaddr', re-format it
if 'macaddr' in n2['user']: