Skip to content

Commit 78e6813

Browse files
committed
Make NVRAM backup logging less intimidating by removing read warnings
1 parent e2a8fd7 commit 78e6813

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

zigpy_znp/tools/nvram_read.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def backup(radio_path: str):
3939
nwk_nvid + offset, item_type=t.Bytes
4040
)
4141
except SecurityError:
42-
LOGGER.error("Read not allowed for %s", key)
42+
LOGGER.warning("Read disallowed for %s", key)
4343
continue
4444
except KeyError:
4545
break
@@ -50,10 +50,9 @@ async def backup(radio_path: str):
5050
try:
5151
value = await znp.nvram.osal_read(nwk_nvid, item_type=t.Bytes)
5252
except KeyError:
53-
LOGGER.warning("Read failed for %s", nwk_nvid)
5453
continue
5554
except SecurityError:
56-
LOGGER.error("Read not allowed for %s", nwk_nvid)
55+
LOGGER.warning("Read disallowed for %s", nwk_nvid)
5756
continue
5857

5958
LOGGER.info("%s = %s", nwk_nvid, value)
@@ -91,7 +90,7 @@ async def main(argv):
9190
args = parser.parse_args(argv)
9291

9392
obj = await backup(args.serial)
94-
args.output.write(json.dumps(obj, indent=4))
93+
args.output.write(json.dumps(obj, indent=4) + "\n")
9594

9695

9796
if __name__ == "__main__":

0 commit comments

Comments
 (0)