Skip to content

Commit

Permalink
Improve dump.py example as for #255
Browse files Browse the repository at this point in the history
  • Loading branch information
albertogeniola committed Jan 3, 2023
1 parent d346e6f commit 1f9eb87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})")

Expand Down

0 comments on commit 1f9eb87

Please sign in to comment.