From 10a0f9ed929449543e5caab7e5f8855e0e68605b Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Sun, 20 May 2012 20:36:05 +0800 Subject: 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 #2075] (Bitbake rev: f5b3bf115dc1ffbfb241a49cec0fc3654cb71021) Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/perforce.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/fetch2/perforce.py') diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index cbdc84853c..6abf15d65a 100644 --- a/bitbake/lib/bb/fetch2/perforce.py +++ b/bitbake/lib/bb/fetch2/perforce.py @@ -27,6 +27,7 @@ BitBake build tools. from future_builtins import zip import os +import subprocess import logging import bb from bb import data @@ -184,7 +185,7 @@ class Perforce(FetchMethod): dest = list[0][len(path)+1:] where = dest.find("#") - os.system("%s%s print -o %s/%s %s" % (p4cmd, p4opt, module, dest[:where], list[0])) + subprocess.call("%s%s print -o %s/%s %s" % (p4cmd, p4opt, module, dest[:where], list[0]), shell=True) count = count + 1 if count == 0: -- cgit v1.2.3-54-g00ecf