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)
|
||||||
|
|
||||||
|
signal.signal(signal.SIGTERM, sigtermHandler)
|
||||||
|
|
||||||
with StateMachine() as stateMachine:
|
with StateMachine() as stateMachine:
|
||||||
signal.signal(signal.SIGTERM, sigtermHandler)
|
|
||||||
excChildListener()
|
excChildListener()
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue