diff options
-rw-r--r-- | cinderclient/tests/unit/fakes.py | 2 | ||||
-rw-r--r-- | cinderclient/utils.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cinderclient/tests/unit/fakes.py b/cinderclient/tests/unit/fakes.py index 24ef8b3..b4bcafc 100644 --- a/cinderclient/tests/unit/fakes.py +++ b/cinderclient/tests/unit/fakes.py @@ -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 diff --git a/cinderclient/utils.py b/cinderclient/utils.py index c501e7c..ff339d0 100644 --- a/cinderclient/utils.py +++ b/cinderclient/utils.py @@ -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: |