summaryrefslogtreecommitdiffstats
path: root/src/discover.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/discover.py')
-rw-r--r--src/discover.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/discover.py b/src/discover.py
index e2351b3..f5d12ec 100644
--- a/src/discover.py
+++ b/src/discover.py
@@ -16,13 +16,13 @@ async def discover(debug=False):
except Exception:
return []
-async def main():
- check_debug = os.getenv("DEBUG", "FALSE").upper() == "TRUE"
+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:
print("DEBUG MODE ENABLED")
devices = await discover(debug=check_debug)
-
print(devices)
+ return devices
if __name__ == "__main__":
asyncio.run(main()) \ No newline at end of file
git.ajschof.me — hosted by ajschofield — powered by cgit