Merge "Use instanceof instead of type"

This commit is contained in:
Jenkins 2016-02-29 11:06:55 +00:00 committed by Gerrit Code Review
commit 40610efd4d
2 changed files with 2 additions and 2 deletions
cinderclient

@ -42,7 +42,7 @@ class FakeClient(object):
result = True
try:
for key, value in partial.items():
if type(value) is dict:
if isinstance(value, dict):
result = self._dict_match(value, real[key])
else:
assert real[key] == value

@ -140,7 +140,7 @@ def print_list(objs, fields, exclude_unavailable=False, formatters=None,
field_name = field.replace(' ', '_')
else:
field_name = field.lower().replace(' ', '_')
if type(o) == dict and field in o:
if isinstance(o, dict) and field in o:
data = o[field]
else:
if not hasattr(o, field_name) and exclude_unavailable: