Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/core.py
diff options
context:
space:
mode:
authorJCTutorius <charlie@tutorius-dev.(none)>2009-10-21 05:06:48 (GMT)
committer JCTutorius <charlie@tutorius-dev.(none)>2009-10-21 05:06:48 (GMT)
commit926238a2c54daae80d4c561b4cda8546d40173a7 (patch)
treeffa9f6327fa6617314d1d8ccda96e9a1382daa19 /tutorius/core.py
parent912528253fcf1fc43c1a2d02ffe6e540fe60d8e7 (diff)
vault merge
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]