Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on close() #5

Closed
sdegrande opened this issue Nov 6, 2020 · 1 comment
Closed

Crash on close() #5

sdegrande opened this issue Nov 6, 2020 · 1 comment

Comments

@sdegrande
Copy link

Given that the close() method calls __clock.cancel(), if crashes if a clock was not initialized.

This simple patch is working for me :

diff --git a/lib/StupidArtnet.py b/lib/StupidArtnet.py
index 10b92d8..c26ae22 100644
--- a/lib/StupidArtnet.py
+++ b/lib/StupidArtnet.py
@@ -133,7 +133,10 @@ class StupidArtnet():
 
        def stop(self):
                """Stops thread clock."""
-               self.__clock.cancel()
+               try:
+                       self.__clock.cancel()
+               except:
+                       pass
 
        ##
        # SETTERS - HEADER
@cpvalente
Copy link
Owner

cpvalente commented Feb 19, 2021

thank you
fixed as suggested #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants