Skip to content

Commit

Permalink
PY3 : Replice dict.iteritems() with dict.items()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rajathere committed Oct 19, 2018
1 parent 156c9f1 commit a58e893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cyborg/db/sqlalchemy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def deployable_get_by_filters_with_attributes(self, context,
'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)
Expand Down

0 comments on commit a58e893

Please sign in to comment.