Python3: Add support for iteritems and iterkeys

Replaced dict.iteritems with dict.items
Replaced dict.iterkeys with key in dict

Partially implements: blueprint trove-python3
Change-Id: I24c3fdea4f40ef92dd6cd564ee34eab8c03b2520
This commit is contained in:
abhishekkekane
2016-01-31 00:23:01 -08:00
committed by Abhishek Kekane
parent de46ece85e
commit 70f4e115b6
15 changed files with 25 additions and 25 deletions

View File

@@ -83,13 +83,13 @@ def create_method_args_string(*args, **kwargs):
def stringify_keys(dictionary):
if dictionary is None:
return None
return {str(key): value for key, value in dictionary.iteritems()}
return {str(key): value for key, value in dictionary.items()}
def exclude(key_values, *exclude_keys):
if key_values is None:
return None
return {key: value for key, value in key_values.iteritems()
return {key: value for key, value in key_values.items()
if key not in exclude_keys}