Merge branch 'master' of ralfj.de:saartuer
[saartuer.git] / statemachine.py
index 1d75b2c1c53d2f12433a0d1a88fe73c01e3307be..70f9fe3e3cd942d16a992087bb8e76705a895138 100644 (file)
@@ -136,7 +136,6 @@ class StateMachine():
        class AbstractStateWhereOpeningIsRedundant(State):
                def handle_open_event(self, callback):
                        # intentionally not calling super() implementation
-                       # FIXME contradicting original plan where open would be ignored in StateAboutToOpen?
                        callback("299 redundant: Space seems to be already open. Still processing your request tough.")
                        logger.warning("Received OPEN command in StateAboutToOpen. This should not be necessary.")
                        self.actor().act(Actor.CMD_OPEN)
@@ -184,7 +183,7 @@ class StateMachine():
        class StateClosing(State):
                # TODO: share code with StateOpening, and possibly also with the nerv-mechanism from StateAboutToOpen
                def __init__(self,callback,sm):
-                       State.__init__(self,sm)
+                       super().__init__(sm)
                        self.callbacks=[callback]
                        # FIXME: can we send "202 processing: Trying to close the door" here? Are the callbacks multi-use?
                        self.tries = 0