Skip to content

Commit

Permalink
Print version after device info
Browse files Browse the repository at this point in the history
  • Loading branch information
clssn committed Apr 23, 2024
1 parent 3727591 commit 886e0fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/numato_gpio/__main__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
"""Main module printing detected numato devices on the command-line."""
from numato_gpio import discover, cleanup, devices

import importlib.metadata
from numato_gpio import cleanup, devices, discover


def main():
"""Print out information about all discovered devices."""
try:
discover()
print(f"Discovered devices: {'(None)' if not devices else ''}")
print(f"\nnumato-gpio v{importlib.metadata.version('numato-gpio')}")
for device in devices.values():
print(device)
finally:
Expand Down

0 comments on commit 886e0fe

Please sign in to comment.