mirror of
https://github.com/meshtastic/python.git
synced 2026-04-19 14:27:07 -04:00
Pretty indent --info JSON output (see below for details)
Changes to make --info much more human readable (while still keeping machine readabilty for anyone foolish enough to be parsing the existing output as text) * change message_to_json to optionally not strip the multiline JSON * use multiline=True for the two places we are printing to the console * make the node list JSON indented
This commit is contained in:
@@ -64,11 +64,11 @@ class Node:
|
||||
"""Show human readable description of our node"""
|
||||
prefs = ""
|
||||
if self.localConfig:
|
||||
prefs = message_to_json(self.localConfig)
|
||||
prefs = message_to_json(self.localConfig, multiline=True)
|
||||
print(f"Preferences: {prefs}\n")
|
||||
prefs = ""
|
||||
if self.moduleConfig:
|
||||
prefs = message_to_json(self.moduleConfig)
|
||||
prefs = message_to_json(self.moduleConfig, multiline=True)
|
||||
print(f"Module preferences: {prefs}\n")
|
||||
self.showChannels()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user