summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-07 20:16:32 +0000
committerAlex Schofield <git@ajschof.me>2025-02-07 20:16:32 +0000
commit2a0fca79b62ed3f404d352fa67162bf29d769d5d (patch)
treebc9f5df1412be9571d8e45f07b9ec8b50d4d5ec5 /src
parentdee08db89f2ff6aa20e3d94d1920ae77ac5b903d (diff)
downloadtp-logger-2a0fca79b62ed3f404d352fa67162bf29d769d5d.tar.gz
tp-logger-2a0fca79b62ed3f404d352fa67162bf29d769d5d.zip
fix tests not working due to incorrect imports
Diffstat (limited to 'src')
-rw-r--r--src/main.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.py b/src/main.py
new file mode 100644
index 0000000..d705374
--- /dev/null
+++ b/src/main.py
@@ -0,0 +1,16 @@
+from discover import discover
+import os
+from logger import get_logger
+import asyncio
+
+logger = get_logger("Main")
+
+async def main(debug_flag=None):
+ check_debug = debug_flag if debug_flag is not None else os.getenv("DEBUG", "FALSE").upper() == "TRUE"
+ if check_debug:
+ logger.info("Debug mode is enabled")
+ devices = await discover(debug=check_debug)
+ print(devices)
+
+if __name__ == "__main__":
+ asyncio.run(main())
git.ajschof.me — hosted by ajschofield — powered by cgit