avoid hard-coding a default value twice
authorRalf Jung <post@ralfj.de>
Sun, 27 Oct 2013 15:53:00 +0000 (16:53 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 27 Oct 2013 15:53:00 +0000 (16:53 +0100)
statemachine.py

index a3a24d4cea68b09a2ae770640a6688621380cb53..dcee055c6413962986df6e635c7a8889e81f0219 100644 (file)
@@ -307,7 +307,7 @@ class StateMachine():
        def __init__(self, actor, waker, fallback = False):
                self.actor = actor
                self.callback = ThreadFunction(self._callback, name="StateMachine")
        def __init__(self, actor, waker, fallback = False):
                self.actor = actor
                self.callback = ThreadFunction(self._callback, name="StateMachine")
-               self.current_state = StateMachine.StateStart(self, None, fallback)
+               self.current_state = StateMachine.StateStart(self, fallback=fallback)
                self.pins = None
                self.old_pins = None
                waker.register(lambda: self.callback(StateMachine.CMD_WAKEUP), 1.0) # wake up every second
                self.pins = None
                self.old_pins = None
                waker.register(lambda: self.callback(StateMachine.CMD_WAKEUP), 1.0) # wake up every second