diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-05-20 20:36:05 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-23 11:28:26 +0100 |
commit | f5b3bf115dc1ffbfb241a49cec0fc3654cb71021 (patch) | |
tree | 1e91f6317bccedeebb646eff11b444e9e78821ce /lib/bb/ui/ncurses.py | |
parent | e3c213015953d1a0afb5ef4be59e1264990e5cee (diff) | |
download | openembedded-core-contrib-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/ui/ncurses.py')
-rw-r--r-- | lib/bb/ui/ncurses.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/ui/ncurses.py b/lib/bb/ui/ncurses.py index 8524446d22..1425bbd263 100644 --- a/lib/bb/ui/ncurses.py +++ b/lib/bb/ui/ncurses.py @@ -47,7 +47,7 @@ from __future__ import division import logging -import os, sys, curses, itertools, time +import os, sys, curses, itertools, time, subprocess import bb import xmlrpclib from bb import ui @@ -286,7 +286,7 @@ class NCursesUI: # bb.error("log data follows (%s)" % logfile) # number_of_lines = data.getVar("BBINCLUDELOGS_LINES", d) # if number_of_lines: -# os.system('tail -n%s %s' % (number_of_lines, logfile)) +# subprocess.call('tail -n%s %s' % (number_of_lines, logfile), shell=True) # else: # f = open(logfile, "r") # while True: |