genlib/fsm: fix handling of zero delayed_enter
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 10 Jun 2013 20:49:05 +0000 (22:49 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 10 Jun 2013 20:49:05 +0000 (22:49 +0200)
migen/genlib/fsm.py

index 300e8e9fa902c09aa002261cebfce0020adcf733..9463f002eef32506e74ec700da1f77852b878a28 100644 (file)
@@ -20,7 +20,7 @@ class FSM:
                                self.actions.append([self.next_state(target_state)])
                        else:
                                # alias
-                               setattr(self, name, getattr(self, target_state))
+                               setattr(self, name, target_state)
        
        def reset_state(self, state):
                self._state.reset = state