Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/core.py')
-rw-r--r--tutorius/core.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tutorius/core.py b/tutorius/core.py
index b24b80b..cf1d6b3 100644
--- a/tutorius/core.py
+++ b/tutorius/core.py
@@ -505,10 +505,9 @@ class FiniteStateMachine(State):
#TODO : Move this code inside the State itself - we're breaking
# encap :P
- if st._transitions:
- for event, state in st._transitions.items():
- if state == state_name:
- del st._transitions[event]
+ for event in st._transitions:
+ if st._transitions[event] == state_name:
+ del st._transitions[event]
# Remove the state from the dictionary
del self._states[state_name]