From 02d688e131936c799f462fadb14c9333ed0409ad Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Fri, 29 Apr 2022 17:59:15 +0200 Subject: [PATCH] L2SS-769: Also do not allow num_pointings to be negative --- tangostationcontrol/tangostationcontrol/devices/beam_device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/beam_device.py b/tangostationcontrol/tangostationcontrol/devices/beam_device.py index 439e19117..90e1e4e36 100644 --- a/tangostationcontrol/tangostationcontrol/devices/beam_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/beam_device.py @@ -161,7 +161,7 @@ class beam_device(lofar_device): def configure_for_initialise(self, num_pointings): super().configure_for_initialise() - if num_pointings > self.MAX_POINTINGS: + if not (0 < num_pointings <= self.MAX_POINTINGS): raise ValueError(f"beam_device is configured to support 0 - {self.MAX_POINTINGS} pointings, but {num_pointings} were requested") # Initialise tracking control -- GitLab