Commit e7e8658c authored by Cyril Guilloud's avatar Cyril Guilloud
Browse files

make '__state_changed() ' accessible to derived classes.

parent 2a242c9d
Pipeline #38349 failed with stages
in 139 minutes and 51 seconds
......@@ -62,7 +62,7 @@ class TangoShutter(BaseShutter):
self._state_channel = Channel(
f"{name}:state", default_value="UNKNOWN", callback=self.__state_changed
f"{name}:state", default_value="UNKNOWN", callback=self._state_changed
def _init_type(self):
......@@ -126,7 +126,7 @@ class TangoShutter(BaseShutter):
except DevFailed:
raise RuntimeError(f"Communication error with {self.__control.dev_name()}")
def __state_changed(self, stat):
def _state_changed(self, stat):
"""Send a signal when state changes"""
event.send(self, "state", stat)
......@@ -244,7 +244,7 @@ class TangoShutter(BaseShutter):
with Timeout(timeout, RuntimeError("Execution timeout")):
while self.state != state:
def _wait_mode(self, mode, timeout=3):
with Timeout(timeout, RuntimeError(f"Cannot set {mode} opening")):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment