Skip to content

Commit

Permalink
🐛 Fix startup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jerr0328 committed Jun 29, 2020
1 parent cf658d7 commit 55d2241
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion co2mini/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def co2_callback(sensor, value):


def main():
device = sys.argv[1] or "/dev/co2mini0"
# TODO: Better CLI handling
device = sys.argv[1] if len(sys.argv) > 1 else "/dev/co2mini0"
logger.info("Starting with device %s", device)

# Expose metrics
Expand All @@ -41,6 +42,9 @@ def main():
except ImportError:
pass

# Ensure thread doesn't just end without cleanup
co2meter.join()


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="co2mini",
version="0.1.0",
version="0.1.1",
author="Jeremy Mayeres",
author_email="[email protected]",
description="Monitor CO2 levels with Prometheus and/or HomeKit",
Expand Down

0 comments on commit 55d2241

Please sign in to comment.