From a58e89365414847ea5b8f2782a923343427faad2 Mon Sep 17 00:00:00 2001 From: whoami-rajat Date: Fri, 19 Oct 2018 22:31:07 +0530 Subject: [PATCH] PY3 : Replice dict.iteritems() with dict.items() py3 tests for cyborg are failing due to dict.iteritems() which has been removed in python 3 [1]. This patch replaces that usage with dict.items, which also works in python 2.7, as recommended. [1] https://wiki.python.org/moin/Python3.0#Built-In_Changes Change-Id: Ic23c0c09b346cb59344828e8189036306072e040 --- cyborg/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyborg/db/sqlalchemy/api.py b/cyborg/db/sqlalchemy/api.py index 488b6829..ac15249a 100644 --- a/cyborg/db/sqlalchemy/api.py +++ b/cyborg/db/sqlalchemy/api.py @@ -273,7 +273,7 @@ class Connection(api.Connection): 'accelerator_id'] attribute_filters = {} filters_copy = copy.deepcopy(filters) - for key, value in filters_copy.iteritems(): + for key, value in filters_copy.items(): if key not in exact_match_filter_names: # This key is not in the deployable regular fields value = filters.pop(key)