1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 01:40:07 +00:00

bitbake: toaster: use items and range instead of old APIs

Used items() and range() APIs instead of iteritems() and
xrange() as latter don't exist in python 3

[YOCTO #9584]

(Bitbake rev: 372dd3abcb201bd9ac2c3189c5505d3578ce0dd0)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2016-05-10 16:13:50 +03:00
committed by Richard Purdie
parent 96ce543150
commit 314541f600
5 changed files with 6 additions and 6 deletions
@@ -286,7 +286,7 @@ class TableFilterMap(object):
def to_json(self, queryset):
data = {}
for filter_name, table_filter in self.__filters.iteritems():
for filter_name, table_filter in self.__filters.items():
data[filter_name] = table_filter.to_json()
return data
+1 -1
View File
@@ -2279,7 +2279,7 @@ if True:
# Strip trailing/leading whitespace from all values
# put into a new dict because POST one is immutable
post_data = dict()
for key,val in request.POST.iteritems():
for key,val in request.POST.items():
post_data[key] = val.strip()
+2 -2
View File
@@ -278,12 +278,12 @@ class ToasterTable(TemplateView):
# Make a unique cache name
cache_name = self.__class__.__name__
for key, val in request.GET.iteritems():
for key, val in request.GET.items():
if key == 'nocache':
continue
cache_name = cache_name + str(key) + str(val)
for key, val in kwargs.iteritems():
for key, val in kwargs.items():
cache_name = cache_name + str(key) + str(val)
# No special chars allowed in the cache name apart from dash