1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

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>
This commit is contained in:
Kang Kai
2012-06-14 18:10:57 +08:00
committed by Richard Purdie
parent a87ce4308e
commit d2bdfe0e66
+2 -2
View File
@@ -27,6 +27,7 @@ import hashlib
import os import os
import re import re
import shlex import shlex
import subprocess
from bb.ui.crumbs.hobcolor import HobColors from bb.ui.crumbs.hobcolor import HobColors
from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
from bb.ui.crumbs.progressbar import HobProgressBar from bb.ui.crumbs.progressbar import HobProgressBar
@@ -871,8 +872,7 @@ class DeployImageDialog (CrumbsDialog):
tmpname = os.tmpnam() tmpname = os.tmpnam()
cmdline += "\"sudo dd if=" + self.image_path + \ cmdline += "\"sudo dd if=" + self.image_path + \
" of=" + combo_item + "; echo $? > " + tmpname + "\"" " of=" + combo_item + "; echo $? > " + tmpname + "\""
deploy_process = bb.process.Popen(shlex.split(cmdline)) subprocess.call(shlex.split(cmdline))
deploy_process.wait()
# if file tmpname not exists, that means there is something wrong with xterm # if file tmpname not exists, that means there is something wrong with xterm
# user can get the error message from xterm so no more warning need. # user can get the error message from xterm so no more warning need.