summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-30 11:16:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-14 14:10:03 +0100
commitd19b784c1a2a4380c63947690ae6f7fa393c1ebc (patch)
treef7fa8caad42c17c072ae5837e028fbaf66586ba9 /bitbake/lib
parent9cfa66bd13afd339760209ad9977c67464118c93 (diff)
downloadast2050-yocto-poky-d19b784c1a2a4380c63947690ae6f7fa393c1ebc.zip
ast2050-yocto-poky-d19b784c1a2a4380c63947690ae6f7fa393c1ebc.tar.gz
bitbake: toaster: whitespace fix
This patch is just a whitespace (end-of-line) fix. (Bitbake rev: 5f33d1a240faa49bd8259a48eb15ef57a6b4ce55) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py18
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py14
2 files changed, 16 insertions, 16 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index be75b21..b953aa1 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -142,7 +142,7 @@ def variable_parent_name(value):
"""
value=re.sub('_\$.*', '', value)
return re.sub('_[a-z].*', '', value)
-
+
@register.filter
def filter_setin_files(file_list,matchstr):
""" filter/search the 'set in' file lists. Note
@@ -150,7 +150,7 @@ def filter_setin_files(file_list,matchstr):
the <p> marks, but this is safe as the data
is file paths
"""
-
+
# no filters, show last file (if any)
if matchstr == ":":
if file_list:
@@ -162,24 +162,24 @@ def filter_setin_files(file_list,matchstr):
htmlstr=""
# match only filters
if search == '':
- for i in range(len(file_list)):
+ for i in range(len(file_list)):
if re.search(filter, file_list[i].file_name):
if htmlstr.find(file_list[i].file_name + "<p>") < 0:
htmlstr += file_list[i].file_name + "<p>"
return htmlstr
-
+
# match only search string, plus always last file
if filter == "":
- for i in range(len(file_list)-1):
+ for i in range(len(file_list)-1):
if re.search(search,file_list[i].file_name):
if htmlstr.find(file_list[i].file_name + "<p>") < 0:
htmlstr += file_list[i].file_name + "<p>"
if htmlstr.find(file_list[len(file_list)-1].file_name) < 0:
htmlstr += file_list[len(file_list)-1].file_name
return htmlstr
-
+
# match filter or search string
- for i in range(len(file_list)):
+ for i in range(len(file_list)):
if re.search(filter, file_list[i].file_name) or re.search(search,file_list[i].file_name):
if htmlstr.find(file_list[i].file_name + "<p>") < 0:
htmlstr += file_list[i].file_name + "<p>"
@@ -218,7 +218,7 @@ def filtered_packageversion(version, revision):
else ""
"""
return "" if (not version or version == "") else version if (not revision or revision == "") else version + "-" + revision
-
+
@register.filter
def filter_sizeovertotal(package_object, total_size):
""" Return the % size of the package over the total size argument
@@ -227,7 +227,7 @@ def filter_sizeovertotal(package_object, total_size):
size = package_object.installed_size
if size == None or size == '':
size = package_object.size
-
+
return '{:.1%}'.format(float(size)/float(total_size))
from django.utils.safestring import mark_safe
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 89c02d4..a57f001 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -429,7 +429,7 @@ def builddashboard( request, build_id ):
ndx = 0;
f = i.file_name[ ndx + 1: ]
imageFiles.append({ 'path': f, 'size' : i.file_size })
- if ( t.is_image and
+ if ( t.is_image and
(( len( imageFiles ) <= 0 ) or ( len( t.license_manifest_path ) <= 0 ))):
targetHasNoImages = True
elem[ 'imageFiles' ] = imageFiles
@@ -516,8 +516,8 @@ def task( request, build_id, task_id ):
}
if request.GET.get( 'show_matches', "" ):
context[ 'showing_matches' ] = True
- context[ 'matching_tasks' ] = Task.objects.filter(
- sstate_checksum=task.sstate_checksum ).filter(
+ context[ 'matching_tasks' ] = Task.objects.filter(
+ sstate_checksum=task.sstate_checksum ).filter(
build__completed_on__lt=task.build.completed_on).exclude(
order__isnull=True).exclude(outcome=Task.OUTCOME_NA).order_by('-build__completed_on')
@@ -551,14 +551,14 @@ def target_common( request, build_id, target_id, variant ):
mandatory_parameters = { 'count': 25, 'page' : 1, 'orderby':'name:+'};
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
- return _redirect_parameters(
- variant, request.GET, mandatory_parameters,
+ return _redirect_parameters(
+ variant, request.GET, mandatory_parameters,
build_id = build_id, target_id = target_id )
( filter_string, search_term, ordering_string ) = _search_tuple( request, Package )
# FUTURE: get rid of nested sub-queries replacing with ManyToMany field
queryset = Package.objects.filter(
- size__gte = 0,
+ size__gte = 0,
id__in = Target_Installed_Package.objects.filter(
target_id=target_id ).values( 'package_id' ))
packages_sum = queryset.aggregate( Sum( 'installed_size' ))
@@ -682,7 +682,7 @@ his package',
'clclass' : 'layer_directory',
'hidden' : 1,
}
- context = {
+ context = {
'objectname': variant,
'build' : Build.objects.filter( pk = build_id )[ 0 ],
'target' : Target.objects.filter( pk = target_id )[ 0 ],
OpenPOWER on IntegriCloud