On Monday 09 November 2015 16:01:36 Aníbal Limón wrote:
> [YOCTO #8390]
> 
> Signed-off-by: Aníbal Limón <anibal.li...@linux.intel.com>
> ---
>  upgradehelper.py | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/upgradehelper.py b/upgradehelper.py
> index 9b321f6..ae40fb1 100755
> --- a/upgradehelper.py
> +++ b/upgradehelper.py
> @@ -28,6 +28,7 @@
> 
>  import argparse
>  import os
> +from subprocess import call
>  import logging as log
>  from logging import debug as D
>  from logging import info as I
> @@ -734,17 +735,22 @@ if __name__ == "__main__":
>      global settings
>      global maintainer_override
> 
> +    if not os.getenv('BUILDDIR', False):
> +        E(" You must source oe-init-build-env before running this
> script!\n") 
> +        exit(1)
> +
> +    devnull = open(os.devnull, 'wb');
> +    if call(["git", "config", "user.name"], stdout=devnull, stderr=devnull)
> or \ 
> +        call(["git", "config", "user.email"], stdout=devnull,
> stderr=devnull): 
> +        E(" Git isn't configure please configure user name and email\n") 
> +        exit(1)

"isn't configure" -> "isn't configured"

Also, we're doing an awful lot of "from xxxx import yyyy" in this code which 
for the most part seems like poor style. For this addition can you simply 
import subprocess and then use subprocess.call() ?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to