re-worked the code for ch-set and ch-enable/ch-disable; updated tests

This commit is contained in:
Mike Kinney
2021-12-10 19:10:09 -08:00
parent 8d45c60811
commit ce794ee035
5 changed files with 62 additions and 16 deletions

View File

@@ -28,8 +28,9 @@ class Node:
print("Channels:")
if self.channels:
for c in self.channels:
if c.role != channel_pb2.Channel.Role.DISABLED:
cStr = stripnl(MessageToJson(c.settings))
cStr = stripnl(MessageToJson(c.settings))
# only show if there is no psk (meaning disabled channel)
if c.settings.psk:
print(f" {channel_pb2.Channel.Role.Name(c.role)} psk={pskToString(c.settings.psk)} {cStr}")
publicURL = self.getURL(includeAll=False)
adminURL = self.getURL(includeAll=True)