Use instanceof instead of type

Adjusted conditional statements to use instanceof when
comparing variables. Instanceof supports inheritance type
checking better than type.

Change-Id: I4ee0004934dc2322d43ef07e797a6811e39a812c
Closes-Bug: 1548530
This commit is contained in:
Brandon Palm
2016-02-22 16:20:30 -06:00
parent c57fc41c33
commit 11a8f911af
3 changed files with 6 additions and 6 deletions
openstackclient

@ -61,7 +61,7 @@ def simple_filter(
# Searching data fields
search_value = d[attr]
elif (property_field and property_field in d and
type(d[property_field]) is dict):
isinstance(d[property_field], dict)):
# Searching a properties field - do this separately because
# we don't want to fail over to checking the fields if a
# property name is given.