def exit_on_error(maestro): PL.p_log_errorno("ERROR: we've had either a camera or network error; exiting prematurely and signalling PolonatorImager to retry the current scan") maestro.status() PC.camera_close() net.py_network_stopserver() maestro.stop() PL.p_log_errorno("ERROR: exiting") sys.exit(10)
# ready to increment flowcell counter, reset array counter */ curr_array = 0 curr_fc += 1 print "Finished handling\t \t \t \t " # end if # end if # end if PL.p_log("STATUS:\tPolonator-acquirer: re-entering image-receive loop...") # end if (sPCI.image_ready) # end while print "\n" PL.p_log("STATUS:\tPolonator-acquirer: last image received from camera...") mf.reset_flag() PL.p_log("STATUS:\tPolonator-acquirer: release camera handle...") PC.camera_close() net.py_network_waitforsend() # don't close connection until last image is transmitted net.py_network_stopserver() mf.stop() return 0 # end def def exit_on_error(maestro): PL.p_log_errorno("ERROR: we've had either a camera or network error; exiting prematurely and signalling PolonatorImager to retry the current scan") maestro.status() PC.camera_close() net.py_network_stopserver() maestro.stop() PL.p_log_errorno("ERROR: exiting") sys.exit(10)