aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/perforce.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-05-20 20:36:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-23 11:28:26 +0100
commitf5b3bf115dc1ffbfb241a49cec0fc3654cb71021 (patch)
tree1e91f6317bccedeebb646eff11b444e9e78821ce /lib/bb/fetch2/perforce.py
parente3c213015953d1a0afb5ef4be59e1264990e5cee (diff)
downloadbitbake-f5b3bf115dc1ffbfb241a49cec0fc3654cb71021.tar.gz
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/perforce.py')
-rw-r--r--lib/bb/fetch2/perforce.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py
index cbdc84853..6abf15d65 100644
--- a/lib/bb/fetch2/perforce.py
+++ b/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: