summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/widgets.py')
-rw-r--r--bitbake/lib/toaster/toastergui/widgets.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py
index a1792d997f..feef7c5d95 100644
--- a/bitbake/lib/toaster/toastergui/widgets.py
+++ b/bitbake/lib/toaster/toastergui/widgets.py
@@ -511,13 +511,18 @@ class MostRecentBuildsView(View):
511 buildrequest_id = build_obj.buildrequest.pk 511 buildrequest_id = build_obj.buildrequest.pk
512 build['buildrequest_id'] = buildrequest_id 512 build['buildrequest_id'] = buildrequest_id
513 513
514 build['recipes_parsed_percentage'] = \ 514 if build_obj.recipes_to_parse > 0:
515 int((build_obj.recipes_parsed / 515 build['recipes_parsed_percentage'] = \
516 build_obj.recipes_to_parse) * 100) 516 int((build_obj.recipes_parsed /
517 517 build_obj.recipes_to_parse) * 100)
518 build['repos_cloned_percentage'] = \ 518 else:
519 int((build_obj.repos_cloned / 519 build['recipes_parsed_percentage'] = 0
520 build_obj.repos_to_clone) * 100) 520 if build_obj.repos_to_clone > 0:
521 build['repos_cloned_percentage'] = \
522 int((build_obj.repos_cloned /
523 build_obj.repos_to_clone) * 100)
524 else:
525 build['repos_cloned_percentage'] = 0
521 526
522 tasks_complete_percentage = 0 527 tasks_complete_percentage = 0
523 if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED): 528 if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):