makes more sense to sigterm handler outside state machine context
This commit is contained in:
parent
29f0383f0c
commit
9bc01b4b71
3
main.py
3
main.py
|
@ -30,8 +30,9 @@ if __name__ == '__main__':
|
||||||
GPIO.setwarnings(False)
|
GPIO.setwarnings(False)
|
||||||
GPIO.setmode(GPIO.BCM)
|
GPIO.setmode(GPIO.BCM)
|
||||||
|
|
||||||
with StateMachine() as stateMachine:
|
|
||||||
signal.signal(signal.SIGTERM, sigtermHandler)
|
signal.signal(signal.SIGTERM, sigtermHandler)
|
||||||
|
|
||||||
|
with StateMachine() as stateMachine:
|
||||||
excChildListener()
|
excChildListener()
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue