diff options
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 78ae0aabc8..4c0d5397dc 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
@@ -43,12 +43,13 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options): | |||
43 | if watch: | 43 | if watch: |
44 | if sys.stdout.isatty(): | 44 | if sys.stdout.isatty(): |
45 | # Fool bitbake into thinking it's outputting to a terminal (because it is, indirectly) | 45 | # Fool bitbake into thinking it's outputting to a terminal (because it is, indirectly) |
46 | cmd = 'script -q -c "%s" /dev/null' % cmd | 46 | cmd = 'script -e -q -c "%s" /dev/null' % cmd |
47 | return exec_watch('%s%s' % (init_prefix, cmd), **options) | 47 | return exec_watch('%s%s' % (init_prefix, cmd), **options) |
48 | else: | 48 | else: |
49 | return bb.process.run('%s%s' % (init_prefix, cmd), **options) | 49 | return bb.process.run('%s%s' % (init_prefix, cmd), **options) |
50 | 50 | ||
51 | def exec_watch(cmd, **options): | 51 | def exec_watch(cmd, **options): |
52 | import bb | ||
52 | if isinstance(cmd, basestring) and not "shell" in options: | 53 | if isinstance(cmd, basestring) and not "shell" in options: |
53 | options["shell"] = True | 54 | options["shell"] = True |
54 | 55 | ||
@@ -65,7 +66,11 @@ def exec_watch(cmd, **options): | |||
65 | buf += out | 66 | buf += out |
66 | elif out == '' and process.poll() != None: | 67 | elif out == '' and process.poll() != None: |
67 | break | 68 | break |
68 | return buf | 69 | |
70 | if process.returncode != 0: | ||
71 | raise bb.process.ExecutionError(cmd, process.returncode, buf, None) | ||
72 | |||
73 | return buf, None | ||
69 | 74 | ||
70 | def setup_tinfoil(): | 75 | def setup_tinfoil(): |
71 | import scriptpath | 76 | import scriptpath |