@@ -306,7 +306,7 @@ def _get_control_Bcomp_param(self, param: str) -> float | str | list[float] | No
306306 return self ._get_response_value (self .ask (cmd [:- 2 ]) + cmd [- 2 :])
307307
308308 def _get_response (self , msg : str ) -> str :
309- return msg .split (":" )[- 1 ]
309+ return msg .rsplit (":" , maxsplit = 1 )[- 1 ]
310310
311311 def _get_response_value (self , msg : str ) -> float | str | list [float ] | None :
312312 msg = self ._get_response (msg )
@@ -551,12 +551,12 @@ def _parse_time(self, msg: str) -> str:
551551 def _parse_temp (self , msg : str ) -> float | None :
552552 if "NOT_FOUND" in msg :
553553 return None
554- return float (msg .split ("SIG:TEMP:" )[- 1 ].strip ("K" ))
554+ return float (msg .rsplit ("SIG:TEMP:" , maxsplit = 1 )[- 1 ].strip ("K" ))
555555
556556 def _parse_pres (self , msg : str ) -> float | None :
557557 if "NOT_FOUND" in msg :
558558 return None
559- return float (msg .split ("SIG:PRES:" )[- 1 ].strip ("mB" )) * 1e3
559+ return float (msg .rsplit ("SIG:PRES:" , maxsplit = 1 )[- 1 ].strip ("mB" )) * 1e3
560560
561561 def _recv (self ) -> str :
562562 return super ()._recv ().rstrip ()
@@ -579,7 +579,7 @@ def _set_pump_state(self, pump: str, state: str) -> None:
579579 def _get_parser_pump_speed (self , msg : str ) -> float | None :
580580 if "NOT_FOUND" in msg :
581581 return None
582- return float (msg .split ("SPD:" )[- 1 ].strip ("Hz" ))
582+ return float (msg .rsplit ("SPD:" , maxsplit = 1 )[- 1 ].strip ("Hz" ))
583583
584584 def _add_temp_state (self ) -> None :
585585 for i in range (1 , 17 ):
@@ -599,7 +599,7 @@ def _set_temp_state(self, chan: str, state: str) -> None:
599599 def _get_parser_state (self , key : str , msg : str ) -> str | None :
600600 if "NOT_FOUND" in msg :
601601 return None
602- return msg .split (f"{ key } :" )[- 1 ]
602+ return msg .rsplit (f"{ key } :" , maxsplit = 1 )[- 1 ]
603603
604604
605605Triton = OxfordTriton
0 commit comments