summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-09-25 16:10:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 14:11:59 +0100
commit39ca8b429b6244e9649e7303cbb240adf007bf22 (patch)
tree1b9bfecb4798c1987caa0178eda2d046634c0ae6 /bitbake
parentd6709b013364737bec7d59edd949db3891a6a8fa (diff)
downloadast2050-yocto-poky-39ca8b429b6244e9649e7303cbb240adf007bf22.zip
ast2050-yocto-poky-39ca8b429b6244e9649e7303cbb240adf007bf22.tar.gz
bitbake: toastergui fix size rendering in dirinfo page
We fix the rendering of the size field in dirinfo-related pages by directly calling filtered_filesizeformat and not rendering it through the template engine. Additionally, we enable error dumping into logs if an Exception happens. [YOCTO #6669] (Bitbake rev: afa2431c21b8271b05dc4cca4265f98d9f338007) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index defbbbf..ea81423 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -742,7 +742,6 @@ class LazyEncoder(json.JSONEncoder):
return super(LazyEncoder, self).default(obj)
from toastergui.templatetags.projecttags import filtered_filesizeformat
-from django import template
import os
def _get_dir_entries(build_id, target_id, start):
node_str = {
@@ -797,9 +796,7 @@ def _get_dir_entries(build_id, target_id, start):
# don't use resolved path from above, show immediate link-to
if o.sym_target_id != "" and o.sym_target_id != None:
entry['link_to'] = Target_File.objects.get(pk=o.sym_target_id).path
- t = template.Template('{% load projecttags %} {{ size|filtered_filesizeformat }}')
- c = template.Context({'size': o.size})
- entry['size'] = str(t.render(c))
+ entry['size'] = filtered_filesizeformat(o.size)
if entry['link_to'] != None:
entry['permission'] = node_str[o.inodetype] + o.permission
else:
@@ -808,7 +805,10 @@ def _get_dir_entries(build_id, target_id, start):
entry['group'] = o.group
response.append(entry)
- except:
+ except Exception as e:
+ print "Exception ", e
+ import traceback
+ traceback.print_exc(e)
pass
# sort by directories first, then by name
OpenPOWER on IntegriCloud