aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-03-15 19:47:24 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-03-23 14:54:12 -0700
commit2e6b9b091c9bf888a05eb0a1ddff5e6f273400df (patch)
tree8c263ec7473f9fad7fd2b5805b1a1816ca2a24bb
parent4ea6acb22260ba5076857136c95a6f9223c9f7c5 (diff)
model: pylint fixes
remove redundnant parens replace type with isinstance fix import order Change-Id: I0407cbbf6993290f392f17c398827603b5bc1ebd Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-rw-r--r--tests/unit/benchmark/contexts/test_model.py2
-rw-r--r--yardstick/benchmark/contexts/model.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/benchmark/contexts/test_model.py b/tests/unit/benchmark/contexts/test_model.py
index a4b7d81ef..6ae4e6dac 100644
--- a/tests/unit/benchmark/contexts/test_model.py
+++ b/tests/unit/benchmark/contexts/test_model.py
@@ -12,8 +12,8 @@
# Unittest for yardstick.benchmark.contexts.model
from __future__ import absolute_import
-import mock
import unittest
+import mock
from yardstick.benchmark.contexts import model
diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py
index 8cf3b621c..4873afde3 100644
--- a/yardstick/benchmark/contexts/model.py
+++ b/yardstick/benchmark/contexts/model.py
@@ -154,7 +154,7 @@ class Server(Object): # pragma: no cover
self.placement_groups = []
placement = attrs.get("placement", [])
- placement = placement if type(placement) is list else [placement]
+ placement = placement if isinstance(placement, list) else [placement]
for p in placement:
pg = PlacementGroup.get(p)
if not pg:
@@ -166,7 +166,7 @@ class Server(Object): # pragma: no cover
# support servergroup attr
self.server_group = None
sg = attrs.get("server_group")
- if (sg):
+ if sg:
server_group = ServerGroup.get(sg)
if not server_group:
raise ValueError("server '%s', server_group '%s' is invalid" %