makes more sense to sigterm handler outside state machine context

This commit is contained in:
petrucci4prez 2017-06-11 04:28:53 -04:00
parent 29f0383f0c
commit 9bc01b4b71
1 changed files with 2 additions and 1 deletions

View File

@ -30,8 +30,9 @@ if __name__ == '__main__':
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
with StateMachine() as stateMachine:
signal.signal(signal.SIGTERM, sigtermHandler)
with StateMachine() as stateMachine:
excChildListener()
except Exception: