diff --git a/tangostationcontrol/tangostationcontrol/devices/observation_control.py b/tangostationcontrol/tangostationcontrol/devices/observation_control.py index 4a1bb9f0cefa233acd145e70738841a88a251be8..a2521d4511d84483a0530c7c748522f461bd49ac 100644 --- a/tangostationcontrol/tangostationcontrol/devices/observation_control.py +++ b/tangostationcontrol/tangostationcontrol/devices/observation_control.py @@ -199,7 +199,7 @@ class ObservationControl(lofar_device): self.stop_observation(obs_id) else: # The observation that we are trying to process is not part of the running_obs dictionary - logger.warning("Received an observation_running event for the observation with ID=%s. According to the records in ObservationControl, this observation is not supposed to run. Please check previous logs, especially around the time an observation with this ID was started. Will continue and ignore this event.", obs_id) + logger.warning(f"Received an observation_running event for the observation with ID={obs_id}. According to the records in ObservationControl, this observation is not supposed to run. Please check previous logs, especially around the time an observation with this ID was started. Will continue and ignore this event.") return @only_when_on() @@ -404,7 +404,7 @@ class ObservationControl(lofar_device): error = f"Cannot check if an observation with ID={obs_id} is running, because the observation ID is invalid" Except.throw_exception("IllegalCommand", error, __name__) observation = self.running_observations.get(obs_id) - return True if observation is not None else False + return observation is not None @command(dtype_out = DevBoolean) @only_when_on()