summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-30 15:51:20 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:04 +0100
commitce9cff5b2836ae202c28acc7ca8dda65e14c1d56 (patch)
treea06f6fc68fd70f8af6af59fa79983ff1979f85ef /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parent9434eee39aafa562d256d190cc66b69b1647ae40 (diff)
downloadpoky-ce9cff5b2836ae202c28acc7ca8dda65e14c1d56.tar.gz
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 <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 75f2261be8..1d680365ad 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -90,7 +90,7 @@ def whitespace_space_filter(value, arg):
90def divide(value, arg): 90def divide(value, arg):
91 if int(arg) == 0: 91 if int(arg) == 0:
92 return -1 92 return -1
93 return int(value) / int(arg) 93 return int(value) // int(arg)
94 94
95@register.filter 95@register.filter
96def multiply(value, arg): 96def multiply(value, arg):