Commit 912bc3ff authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

CT-69: Added checks on Scan command input argument.

parent 7a98b3bf
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -1947,7 +1947,22 @@ class CspSubarray(SKASubarray):

        :return: None
        """
        try:
            self._scan_id = int(argin[0])
        except ValueError as val_err:

            self.logging.error("Invalid argument:{}".format(str(var_err)))
            tango.Except.throw_exception("Command failed",
                                         str(val_err),
                                         "Scan execution",
                                         tango.ErrSeverity.ERR)
        except Exception as err:
            self.logging.error("Invalid argument:{}".format(str(err)))
            tango.Except.throw_exception("Command failed",
                                         str(err),
                                         "Scan execution",
                                         tango.ErrSeverity.ERR)

        # invoke the constructor for the command thread
        self.logger.info("Received Scan command with id:{}".format(self._scan_id))
        for device in self._sc_subarray_assigned_fqdn: