From 979dc977076a6779ea582f60629a1c01c8686944 Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Thu, 8 Jun 2017 01:09:55 -0400 Subject: [PATCH] make State.next() raise keyerror when necessary --- stateMachine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stateMachine.py b/stateMachine.py index 5301e96..2add1f3 100644 --- a/stateMachine.py +++ b/stateMachine.py @@ -54,7 +54,7 @@ class State: def next(self, signal): t = (self, signal) - return self if t not in self.stateMachine.transitionTable else self.stateMachine.transitionTable[t] + return self.stateMachine.transitionTable[t] def __str__(self): return self.name