This commit is contained in:
olli 2024-06-26 21:17:24 +02:00
parent bf5c616f01
commit 4d0bf673a5

View File

@ -33,17 +33,22 @@ print('')" >&${g_fd_python_in}
read -u ${g_fd_python_out} g_python_result
local g_errline
local g_err_array
local g_err_msg
# look for error
while read -t 0.001 -u ${g_fd_python_error} g_errline
do
[[ "$g_errline" =~ \>\>\>$ ]] && break
[ -z "$g_errline" ] && break
echo $g_errline 1>&2
g_err_array+=("$g_errline")
g_err_msg="$g_err_msg
$g_errline"
done
[ -n "$g_err_array" ] && return 1
if [ -n "$g_err_msg" ]
then
g_echo_error "$g_err_msg"
return 1
fi
}