Skip to content
Snippets Groups Projects
Commit 10cfb0cc authored by norpol's avatar norpol
Browse files

Add closing of sensor on KeyboardInterrupt to avoid spamming console

parent f1818479
Branches
Tags
1 merge request!309Add closing of sensor on KeyboardInterrupt to avoid spamming console
Pipeline #3924 passed
...@@ -384,4 +384,8 @@ def main(): ...@@ -384,4 +384,8 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
try:
main() main()
except KeyboardInterrupt as e:
sensor.close()
raise e
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment