diff --git a/python/lsst/ts/IntegrationTests/csc_state_transition.py b/python/lsst/ts/IntegrationTests/csc_state_transition.py index 9c9002ec..5ad81995 100644 --- a/python/lsst/ts/IntegrationTests/csc_state_transition.py +++ b/python/lsst/ts/IntegrationTests/csc_state_transition.py @@ -42,6 +42,8 @@ class CSCStateTransition(BaseScript): The index value for the indexed-CSC. state : `str` The state to transition. + sq_index : `int` + The index of the ScriptQueue to use to run the state transition. additional_configuration : `str` Any additional state-transition configuration items. """ @@ -55,17 +57,14 @@ def __init__( self, csc: str, state: str, + sq_index: int, additional_configuration: str = "", ) -> None: super().__init__() self.csc = csc self.state = state + self.index = sq_index self.added_config = additional_configuration - # Set the ScriptQueue index based on which telescope. - if csc[:2].lower() == "at": - self.index = 2 - else: - self.index = 1 # Construct the intermediate configuration list. # Convert the list to a string. temp_config = [self.csc, self.state] @@ -87,9 +86,7 @@ def __init__( def csc_state_transition() -> None: - # Define the lists of CSC and State options. - csc_list = list(utils.cscs) - csc_list.sort() + # Define the State options lists. state_list = list(utils.csc_states) state_list.sort() # Define the script arguments. @@ -132,7 +129,7 @@ def csc_state_transition() -> None: exit() if args.csc.split(":")[0] not in utils.cscs: print( - f"Invalid CSC: {args.csc.split(":")[0]}. " + f"Invalid CSC: {args.csc.split(':')[0]}. " f"Perhaps it is misspelled or not properly capitalized." ) parser.print_help()