summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-06-14 18:10:57 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-14 14:07:17 +0100
commitd2bdfe0e667820718dcfefd845c1b28ccdd31e82 (patch)
tree81c740ccad7603d6223a87a99d90a68737a02baf
parenta87ce4308e51364ea91b8f8448d2d7644e702054 (diff)
downloadpoky-d2bdfe0e667820718dcfefd845c1b28ccdd31e82.tar.gz
ui/crumbs/hig.py: simplify subprocess call
According to Darren's suggestion, subprocess.call() will wait until the subprocess complete. So simplify the code, use subprocess.call() to wait command complete. (Bitbake rev: 3dea9d5a5af82d99d337238981807a4cb1bd5b93) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 0c3f56c432..b586b6c274 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -27,6 +27,7 @@ import hashlib
27import os 27import os
28import re 28import re
29import shlex 29import shlex
30import subprocess
30from bb.ui.crumbs.hobcolor import HobColors 31from bb.ui.crumbs.hobcolor import HobColors
31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker 32from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
32from bb.ui.crumbs.progressbar import HobProgressBar 33from bb.ui.crumbs.progressbar import HobProgressBar
@@ -871,8 +872,7 @@ class DeployImageDialog (CrumbsDialog):
871 tmpname = os.tmpnam() 872 tmpname = os.tmpnam()
872 cmdline += "\"sudo dd if=" + self.image_path + \ 873 cmdline += "\"sudo dd if=" + self.image_path + \
873 " of=" + combo_item + "; echo $? > " + tmpname + "\"" 874 " of=" + combo_item + "; echo $? > " + tmpname + "\""
874 deploy_process = bb.process.Popen(shlex.split(cmdline)) 875 subprocess.call(shlex.split(cmdline))
875 deploy_process.wait()
876 876
877 # if file tmpname not exists, that means there is something wrong with xterm 877 # if file tmpname not exists, that means there is something wrong with xterm
878 # user can get the error message from xterm so no more warning need. 878 # user can get the error message from xterm so no more warning need.