Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_middleware
-
Labels:
-
Story Points:1
-
Epic Link:
-
Sprint:TSSW Sprint - Mar 29 - Apr 12
-
Team:Telescope and Site
-
Urgent?:No
Description
BaseCsc checks for valid simulation mode after it starts the SalInfo object and before it sets some attributes. The effect is that if the simulation mode is rejected then cleanup routines are called (unnecessarily) that fail because of those missing attributes.
Move the test for valid simulation modes earlier and make sure all attributes are set before calling the superclass constructor.
I made construction and close more robust for several classes, to avoid accessing missing attributes in close methods. I also modified BaseCsc to check simulation_mode before calling the parent class constructor.
Pull request: https://github.com/lsst-ts/ts_salobj/pull/186