I would actually like to append the motion/ffmpeg command's output to the error message, when obtaining the version fails. If these commands fail, either the binary is broken, or a linked library, or the CLI has changed. In every case, it would be helpful to have that error in motionEye logs.
The exception does not include the command's STDERR. utils.call_subprocess redirects SDTERR to /dev/null by default. So we could pass stderr=subprocess.PIPE and append output to the error message. But better would be probably to store/access STDERR separately, to append only that one to the error message, while parsing only STDOUT for the actual version string.
While this can be merged, I'll run some more tests regarding this, and am open for suggestions, of course.
I would actually like to append the
motion
/ffmpeg
command's output to the error message, when obtaining the version fails. If these commands fail, either the binary is broken, or a linked library, or the CLI has changed. In every case, it would be helpful to have that error in motionEye logs.The exception does not include the command's STDERR.
utils.call_subprocess
redirects SDTERR to/dev/null
by default. So we could passstderr=subprocess.PIPE
and appendoutput
to the error message. But better would be probably to store/access STDERR separately, to append only that one to the error message, while parsing only STDOUT for the actual version string.While this can be merged, I'll run some more tests regarding this, and am open for suggestions, of course.