From ce9cff5b2836ae202c28acc7ca8dda65e14c1d56 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 30 May 2016 15:51:20 +0300 Subject: bitbake: toaster: use // operator instead of / Division operator works differently in Python 3. It results in float unlike in Python 2, where it results in int. Explicitly used "floor division" operator instead of 'division' operator. This should make the code to result in integer under both pythons. (Bitbake rev: 0c38441ed99b49dae8ef9613e320f0760853d6aa) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/toaster/orm') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index dd6466471d..25bc1dbe15 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -424,7 +424,7 @@ class Build(models.Model): tf = Task.objects.filter(build = self) tfc = tf.count() if tfc > 0: - completeper = tf.exclude(order__isnull=True).count()*100/tfc + completeper = tf.exclude(order__isnull=True).count()*100 // tfc else: completeper = 0 return completeper -- cgit v1.2.3-54-g00ecf