Merge "Use items() instead of iteritems()"
This commit is contained in:
commit
a5bb2c0e5d
@ -94,8 +94,8 @@ class SmarterEncoder(jsonutils.json.JSONEncoder):
|
|||||||
"""Help for JSON encoding dict-like objects."""
|
"""Help for JSON encoding dict-like objects."""
|
||||||
|
|
||||||
def default(self, obj):
|
def default(self, obj):
|
||||||
if not isinstance(obj, dict) and hasattr(obj, 'iteritems'):
|
if not isinstance(obj, dict) and hasattr(obj, 'items'):
|
||||||
return dict(obj.iteritems())
|
return dict(obj.items())
|
||||||
return super(SmarterEncoder, self).default(obj)
|
return super(SmarterEncoder, self).default(obj)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user