From 1f9eb87341af928fb9a4ec9555dfe4112f66b5c8 Mon Sep 17 00:00:00 2001 From: Alberto Geniola Date: Tue, 3 Jan 2023 10:56:22 +0100 Subject: [PATCH] Improve dump.py example as for #255 --- examples/dump.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/dump.py b/examples/dump.py index 3300b996..ab3eb27e 100644 --- a/examples/dump.py +++ b/examples/dump.py @@ -37,10 +37,14 @@ async def main(): print("Registry dump loaded.") print_devices(manager) + # Close the manager. + manager.close() + await http_api_client.async_logout() + def print_devices(manager): devices = manager.find_devices() - print("Discovered %d devices:", len(devices)) + print(f"Discovered {len(devices)} devices:") for dev in devices: print(f". {dev.name} {dev.type} ({dev.uuid})")