Nicer printing

This commit is contained in:
GUVWAF
2023-03-18 16:40:27 +01:00
parent f68e4112e1
commit 802768e0cc
2 changed files with 7 additions and 3 deletions

View File

@@ -78,10 +78,13 @@ class Node:
self.iface._acknowledgment.receivedNak = True
else:
self.iface._acknowledgment.receivedAck = True
print("")
if "getConfigResponse" in p["decoded"]["admin"]:
print("Config is as follows:", p["decoded"]["admin"]['getConfigResponse'])
prefs = stripnl(p["decoded"]["admin"]["getConfigResponse"])
print(f"Preferences: {prefs}\n")
else:
print("Module Config is as follows:", p["decoded"]["admin"]['getModuleConfigResponse'])
prefs = stripnl(p["decoded"]["admin"]["getModuleConfigResponse"])
print(f"Module preferences: {prefs}\n")
def requestConfig(self, configType):
print("Requesting config from remote node (this can take a while).")