From: Ralf Jung Date: Sun, 27 Oct 2013 15:53:00 +0000 (+0100) Subject: avoid hard-coding a default value twice X-Git-Url: https://git.ralfj.de/saartuer.git/commitdiff_plain/09b7d1f18305c08306fb209b414d0be292d5b4e2 avoid hard-coding a default value twice --- diff --git a/statemachine.py b/statemachine.py index a3a24d4..dcee055 100644 --- a/statemachine.py +++ b/statemachine.py @@ -307,7 +307,7 @@ class 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