summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
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:35:11 +0100
commit10a0f9ed929449543e5caab7e5f8855e0e68605b (patch)
tree906283ad2b35380b2240854f120eb646f51c8fab /bitbake/lib/bb/fetch2
parent358016f463958640c694d031a481264a0e770802 (diff)
downloadpoky-10a0f9ed929449543e5caab7e5f8855e0e68605b.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] (Bitbake rev: f5b3bf115dc1ffbfb241a49cec0fc3654cb71021) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py3
1 files changed, 2 insertions, 1 deletions
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.
27 27
28from future_builtins import zip 28from future_builtins import zip
29import os 29import os
30import subprocess
30import logging 31import logging
31import bb 32import bb
32from bb import data 33from bb import data
@@ -184,7 +185,7 @@ class Perforce(FetchMethod):
184 dest = list[0][len(path)+1:] 185 dest = list[0][len(path)+1:]
185 where = dest.find("#") 186 where = dest.find("#")
186 187
187 os.system("%s%s print -o %s/%s %s" % (p4cmd, p4opt, module, dest[:where], list[0])) 188 subprocess.call("%s%s print -o %s/%s %s" % (p4cmd, p4opt, module, dest[:where], list[0]), shell=True)
188 count = count + 1 189 count = count + 1
189 190
190 if count == 0: 191 if count == 0: