diff options
author | mike <michael.jmontcalm@gmail.com> | 2009-10-21 05:10:06 (GMT) |
---|---|---|
committer | mike <michael.jmontcalm@gmail.com> | 2009-10-21 05:10:06 (GMT) |
commit | 58a99dcf76cb1a9f85fa2873f9a2e7b46470ae8b (patch) | |
tree | ffa9f6327fa6617314d1d8ccda96e9a1382daa19 /tutorius/core.py | |
parent | b4e9ca55fc02458a9df04fa7df4d882b79d752be (diff) | |
parent | 926238a2c54daae80d4c561b4cda8546d40173a7 (diff) |
Merge branch 'master' of git://git.sugarlabs.org/tutorius/mainline
Diffstat (limited to 'tutorius/core.py')
-rw-r--r-- | tutorius/core.py | 7 |
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] |