File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -124,14 +124,12 @@ def get_machine_details_from_identifier(
124124 # then find the first match where pvPrefix equals the machine identifier
125125 # that's been passed to this function if it is not found instrument_details will be None
126126 instrument_details = None
127- input_list = caget ("CS:INSTLIST" ).tobytes ().decode ().rstrip ('\x00 ' )
128- if input_list is not None :
129- assert isinstance (input_list , str | bytes )
130- instrument_list = dehex_decompress_and_dejson (input_list )
127+ try :
128+ instrument_list = dehex_decompress_and_dejson (caget ("CS:INSTLIST" ).tobytes ().decode ().rstrip ('\x00 ' ))
131129 instrument_details = next (
132130 (inst for inst in instrument_list if inst ["pvPrefix" ] == machine_identifier ), None
133131 )
134- else :
132+ except AttributeError :
135133 print (
136134 "Error getting instlist, \n Continuing execution..."
137135 )
@@ -212,7 +210,11 @@ def get_blocks(self):
212210 Returns:
213211 A collection of blocks, or None if the PV was not connected
214212 """
215- blocks_hexed = caget (f"{ self .prefix } CS:BLOCKSERVER:BLOCKNAMES" ).tobytes ()
213+ try :
214+ blocks_hexed = caget (f"{ self .prefix } CS:BLOCKSERVER:BLOCKNAMES" ).tobytes ()
215+ except AttributeError as e :
216+ print ("Error getting blocks." )
217+ raise e
216218 return literal_eval (FileUtils .dehex_and_decompress (blocks_hexed ).decode ())
217219
218220 def cget (self , block : str ) -> Any :
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ if "%DETECT_OLD_GALIL%" == "YES" (
8181
8282REM stop_ibex_server calls config_env which means we have to reactivate our venv
8383call " %~dp0 _activate_venv.bat"
84+ call " %~dp0 set_epics_ca_addr_list.bat"
8485
8586call python " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --server_arch %SERVER_ARCH% --confirm_step instrument_deploy_main
8687IF %errorlevel% neq 0 exit /b %errorlevel%
@@ -90,6 +91,7 @@ start /i /wait cmd /c "%START_IBEX%"
9091
9192REM start_ibex_server calls config_env which means we have to reactivate our venv
9293call " %~dp0 _activate_venv.bat"
94+ call " %~dp0 set_epics_ca_addr_list.bat"
9395
9496call python " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --server_arch %SERVER_ARCH% --confirm_step instrument_deploy_post_start
9597call rmdir /s /q %UV_TEMP_VENV%
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ if %errorlevel% neq 0 goto ERROR
88
99set " SOURCE = \\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases"
1010
11- call " %~dp0 set_epics_ca_addr_list.bat"
1211call " %~dp0 install_or_update_uv.bat"
1312call " %~dp0 set_up_venv.bat"
1413if %errorlevel% neq 0 goto ERROR
@@ -39,6 +38,7 @@ IF EXIST "C:\Instrument\Apps\EPICS" (start /wait cmd /c "%STOP_IBEX%")
3938
4039REM stop_ibex_server calls config_env which means we have to reactivate our venv
4140call " %~dp0 _activate_venv.bat"
41+ call " %~dp0 set_epics_ca_addr_list.bat"
4242
4343call python " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --server_arch %SERVER_ARCH% --confirm_step instrument_install
4444if %errorlevel% neq 0 goto ERROR
You can’t perform that action at this time.
0 commit comments