From 337c8af55dac929b72e0bb32ef320cbb4b0e7892 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Tue, 10 May 2016 16:13:50 +0300 Subject: 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: f44986d41055ce7fa3128e1acb6968f9ccc355ba) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/tablefilter.py | 2 +- bitbake/lib/toaster/toastergui/views.py | 2 +- bitbake/lib/toaster/toastergui/widgets.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/toaster/toastergui') diff --git a/bitbake/lib/toaster/toastergui/tablefilter.py b/bitbake/lib/toaster/toastergui/tablefilter.py index 9d15bcff0d..65454e140d 100644 --- a/bitbake/lib/toaster/toastergui/tablefilter.py +++ b/bitbake/lib/toaster/toastergui/tablefilter.py @@ -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 diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 22d1a0ce6a..b256db7b44 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -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() diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index 0f103505b2..c02f9f56ae 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py @@ -281,12 +281,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 -- cgit v1.2.3-54-g00ecf