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, 4 insertions, 3 deletions
diff --git a/tutorius/core.py b/tutorius/core.py
index 6030457..15a0c87 100644
--- a/tutorius/core.py
+++ b/tutorius/core.py
@@ -515,9 +515,10 @@ class FiniteStateMachine(State):
#TODO : Move this code inside the State itself - we're breaking
# encap :P
- for event, state in st._transitions:
- if state == state_name:
- del st._transitions[event]
+ if st._transitions:
+ for event, state in st._transitions.items():
+ if state == state_name:
+ del st._transitions[event]
# Remove the state from the dictionary
del self._states[state_name]