diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-05-01 16:20:33 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-08 17:42:05 +0100 |
commit | 7759cd4931b2e7af19eea79dfac6738a92687665 (patch) | |
tree | e09e11a14b04e02e9902b76505cf3f651d577edc /bitbake/lib/toaster | |
parent | 4a711028c709d4bb1421e1637ae3fb0ac404fb45 (diff) | |
download | poky-7759cd4931b2e7af19eea79dfac6738a92687665.tar.gz |
bitbake: toasterui: proper exit code on toaster errors
This patch modifies the toasterui to properly return the exit
code based on the errors found in the toaster itself.
The upload event file API call will not delete event logs for which
toasterui showed an error. This will facilitate debugging.
Minor enhancement in the buildinfohelper to reduce the number
of lookups on unknown layer objects (prevented testing of the patch).
(Bitbake rev: 1ddd6a9e4280a4adf971132ff1fe7ec9b3252905)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r-- | bitbake/lib/toaster/orm/views.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/orm/views.py b/bitbake/lib/toaster/orm/views.py index 97d792b99e..61d14f9375 100644 --- a/bitbake/lib/toaster/orm/views.py +++ b/bitbake/lib/toaster/orm/views.py | |||
@@ -55,6 +55,8 @@ def eventfile(request): | |||
55 | scriptenv["DATABASE_URL"] = toastermain.settings.getDATABASE_URL() | 55 | scriptenv["DATABASE_URL"] = toastermain.settings.getDATABASE_URL() |
56 | 56 | ||
57 | # run the data loading process and return the results | 57 | # run the data loading process and return the results |
58 | (out, err) = subprocess.Popen([import_script, abstemppath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=scriptenv).communicate() | 58 | importer = subprocess.Popen([import_script, abstemppath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=scriptenv) |
59 | os.remove(abstemppath) | 59 | (out, err) = importer.communicate() |
60 | return HttpResponse("%s\n%s" % (out, err), content_type="text/plain;utf8") | 60 | if importer.returncode == 0: |
61 | os.remove(abstemppath) | ||
62 | return HttpResponse("== Retval %d\n== STDOUT\n%s\n\n== STDERR\n%s" % (importer.returncode, out, err), content_type="text/plain;utf8") | ||