python error handling

This commit is contained in:
olli 2024-03-26 17:07:50 +01:00
parent c982ac9fd3
commit 1c6d547bb2

View File

@ -11,6 +11,11 @@ function g_python {
if ! [[ ${g_python_jobs[*]} =~ python-pipeexec.py ]] if ! [[ ${g_python_jobs[*]} =~ python-pipeexec.py ]]
then then
mkdir -p ${g_tmp}/${g_rnd} mkdir -p ${g_tmp}/${g_rnd}
if [ -s ${g_tmp}/${g_rnd}/python-error ]
then
g_echo_error "From last python run: $(cat ${g_tmp}/${g_rnd}/python-error)"
rm -f ${g_tmp}/${g_rnd}/python-error
fi
[ -p ${g_tmp}/${g_rnd}/python-in ] || mkfifo ${g_tmp}/${g_rnd}/python-in [ -p ${g_tmp}/${g_rnd}/python-in ] || mkfifo ${g_tmp}/${g_rnd}/python-in
[ -p ${g_tmp}/${g_rnd}/python-out ] || mkfifo ${g_tmp}/${g_rnd}/python-out [ -p ${g_tmp}/${g_rnd}/python-out ] || mkfifo ${g_tmp}/${g_rnd}/python-out
echo "while 1: echo "while 1: