Skip to content
Snippets Groups Projects
Commit 85cd810f authored by Taya Snijder's avatar Taya Snijder
Browse files

L2SS-1204 Formatting

parent 91d12046
No related branches found
No related tags found
1 merge request!549L2SS-1204 added station state stubs for the StationManager
...@@ -18,7 +18,6 @@ from tangostationcontrol.devices.lofar_device import LOFARDevice ...@@ -18,7 +18,6 @@ from tangostationcontrol.devices.lofar_device import LOFARDevice
from tangostationcontrol.common.lofar_logging import log_exceptions from tangostationcontrol.common.lofar_logging import log_exceptions
from enum import Enum from enum import Enum
#from enum import StrEnum
logger = logging.getLogger() logger = logging.getLogger()
...@@ -32,6 +31,7 @@ class StationState(Enum): ...@@ -32,6 +31,7 @@ class StationState(Enum):
STANDBY = "STANDBY" STANDBY = "STANDBY"
ON = "ON" ON = "ON"
@device_logging_to_python() @device_logging_to_python()
class StationManager(LOFARDevice): class StationManager(LOFARDevice):
...@@ -43,7 +43,6 @@ class StationManager(LOFARDevice): ...@@ -43,7 +43,6 @@ class StationManager(LOFARDevice):
StationState.ON: [StationState.STANDBY], StationState.ON: [StationState.STANDBY],
} }
# ----------------- # -----------------
# Device Properties # Device Properties
# ----------------- # -----------------
...@@ -154,7 +153,9 @@ class StationManager(LOFARDevice): ...@@ -154,7 +153,9 @@ class StationManager(LOFARDevice):
@log_exceptions() @log_exceptions()
def station_hibernate(self): def station_hibernate(self):
if not self._is_transition_allowed(StationState.HIBERNATE): if not self._is_transition_allowed(StationState.HIBERNATE):
logger.warning(f"Station did not transition to {StationState.HIBERNATE.name}") logger.warning(
f"Station did not transition to {StationState.HIBERNATE.name}"
)
return return
# call the correct state transition function # call the correct state transition function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment