summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorBrandon Palm <bapalm@us.ibm.com>2016-02-22 16:20:30 -0600
committerBrandon Palm <bapalm@us.ibm.com>2016-02-22 16:23:23 -0600
commit11a8f911affe10bacce41ad3474a28aff3417ec3 (patch)
tree4db4dc8767633b6064a5e43ba2622513a1d164d1 /openstackclient/tests
parentc57fc41c33df58237f6b3ec8a5b2a0ff9573da2e (diff)
downloadpython-openstackclient-11a8f911affe10bacce41ad3474a28aff3417ec3.tar.gz
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
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/test_shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/tests/test_shell.py b/openstackclient/tests/test_shell.py
index c4546d89..80b18161 100644
--- a/openstackclient/tests/test_shell.py
+++ b/openstackclient/tests/test_shell.py
@@ -317,7 +317,7 @@ class TestShellOptions(TestShell):
if not test_opts[opt][1]:
continue
key = opt2attr(opt)
- if type(test_opts[opt][0]) is str:
+ if isinstance(test_opts[opt][0], str):
cmd = opt + " " + test_opts[opt][0]
else:
cmd = opt
@@ -331,7 +331,7 @@ class TestShellOptions(TestShell):
if not test_opts[opt][1]:
continue
key = opt2attr(opt)
- if type(test_opts[opt][0]) is str:
+ if isinstance(test_opts[opt][0], str):
cmd = opt + " " + test_opts[opt][0]
else:
cmd = opt