From a07d03cc6f67c88feb9813ae7deb6e4a93552dfe Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Tue, 29 May 2012 22:53:06 +0800 Subject: meta: replace os.system with subprocess.call Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- meta/lib/oe/distro_check.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta/lib') diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py index cc836de38d..455135e650 100644 --- a/meta/lib/oe/distro_check.py +++ b/meta/lib/oe/distro_check.py @@ -343,6 +343,7 @@ def compare_in_distro_packages_list(distro_check_dir, d): return matching_distros def create_log_file(d, logname): + import subprocess logpath = d.getVar('LOG_DIR', True) bb.utils.mkdirhier(logpath) logfn, logsuffix = os.path.splitext(logname) @@ -351,7 +352,7 @@ def create_log_file(d, logname): slogfile = os.path.join(logpath, logname) if os.path.exists(slogfile): os.remove(slogfile) - os.system("touch %s" % logfile) + subprocess.call("touch %s" % logfile, shell=True) os.symlink(logfile, slogfile) d.setVar('LOG_FILE', logfile) return logfile -- cgit 1.2.3-korg