[OE-core] [PATCH] Fix return value checks from subprocess.call()'s

Mikko.Rapeli at bmw.de Mikko.Rapeli at bmw.de
Thu Jun 1 09:44:43 UTC 2017


Hi,

On Fri, May 19, 2017 at 10:17:17AM +0300, Mikko Rapeli wrote:
> Python function subprocess.call() returns the return value of the
> executed process. If return values are not checked, errors may
> go unnoticed and bad things can happen.
> 
> Change all callers of subprocess.call() which do not check for
> the return value to use subprocess.check_call() which raises
> CalledProcessError if the subprocess returns with non-zero value.
> 
> https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module
> 
> All users of the function were found with:
> 
> $ git grep "subprocess\.call" | \
>   egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call'
> 
> Tested similar patch on top of jethro. Only compile tested core-image-minimal
> on poky master branch.

Any comments to this patch?

-Mikko


More information about the Openembedded-core mailing list