Fix pep8 failures due to new hacking rules
Change-Id: Ie6cb4e8d6ab0ce5036566dd6900c45b734f1eb3d
This commit is contained in:
parent
9511371f73
commit
615961558d
@ -109,7 +109,7 @@ class VMScenario(nova_utils.NovaScenario):
|
|||||||
if interpreter:
|
if interpreter:
|
||||||
if isinstance(interpreter, str):
|
if isinstance(interpreter, str):
|
||||||
interpreter = [interpreter]
|
interpreter = [interpreter]
|
||||||
elif type(interpreter) != list:
|
elif not isinstance(interpreter, list):
|
||||||
raise ValueError("command 'interpreter' value must be str "
|
raise ValueError("command 'interpreter' value must be str "
|
||||||
"or list type")
|
"or list type")
|
||||||
cmd.extend(interpreter)
|
cmd.extend(interpreter)
|
||||||
@ -118,7 +118,7 @@ class VMScenario(nova_utils.NovaScenario):
|
|||||||
if remote_path:
|
if remote_path:
|
||||||
if isinstance(remote_path, str):
|
if isinstance(remote_path, str):
|
||||||
remote_path = [remote_path]
|
remote_path = [remote_path]
|
||||||
elif type(remote_path) != list:
|
elif not isinstance(remote_path, list):
|
||||||
raise ValueError("command 'remote_path' value must be str "
|
raise ValueError("command 'remote_path' value must be str "
|
||||||
"or list type")
|
"or list type")
|
||||||
cmd.extend(remote_path)
|
cmd.extend(remote_path)
|
||||||
|
@ -556,7 +556,7 @@ class NeutronScenarioTestCase(test.ScenarioTestCase):
|
|||||||
"context": {"tenant": {"networks":
|
"context": {"tenant": {"networks":
|
||||||
[mock.MagicMock(), mock.MagicMock()]}}})
|
[mock.MagicMock(), mock.MagicMock()]}}})
|
||||||
@ddt.unpack
|
@ddt.unpack
|
||||||
@mock.patch("random.choice", side_effect=lambda l: l[0])
|
@mock.patch("random.choice", side_effect=lambda items: items[0])
|
||||||
def test_get_or_create_network(self, mock_random_choice,
|
def test_get_or_create_network(self, mock_random_choice,
|
||||||
network_create_args=None, context=None):
|
network_create_args=None, context=None):
|
||||||
self.scenario.context = context
|
self.scenario.context = context
|
||||||
|
Loading…
Reference in New Issue
Block a user