Browse Source

Fix some pep8 errors

- F632
- E305
- E117

Change-Id: Id08a49c401a11a6f43ff132e798bdb1088ddb75d
changes/51/727651/1
Rabi Mishra 1 year ago
parent
commit
fa6a29379c
  1. 2
      tripleoclient/heat_launcher.py
  2. 18
      tripleoclient/tests/v1/overcloud_netenv_validate/test_overcloud_netenv_validate.py
  3. 1
      tripleoclient/v1/undercloud_config.py
  4. 1
      tripleoclient/v1/undercloud_preflight.py

2
tripleoclient/heat_launcher.py

@ -280,7 +280,7 @@ class HeatContainerLauncher(HeatBaseLauncher):
# 137 means the container was killed by 'kill -9' which happens
# then we're done creating the Heat stack, so we consider it
# as successful.
if e.returncode is not 137:
if e.returncode != 137:
raise Exception('heat_all container did not run as expected.')
def heat_db_sync(self):

18
tripleoclient/tests/v1/overcloud_netenv_validate/test_overcloud_netenv_validate.py

@ -263,14 +263,14 @@ class TestValidateOvercloudNetenv(fakes.TestValidateOvercloudNetenv):
def test_command(self, mock_nic_validate):
"""Testing the command with a minimal file that will fail"""
with tempfile.NamedTemporaryFile('wt') as net_file:
net_file.write(EMPTY_NETENV)
net_file.flush()
net_file.write(EMPTY_NETENV)
net_file.flush()
arglist = ['--file', net_file.name]
verifylist = [
('netenv', net_file.name),
]
arglist = ['--file', net_file.name]
verifylist = [
('netenv', net_file.name),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
# Validating a minimal file shouldn't raise errors.
self.cmd.take_action(parsed_args)
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
# Validating a minimal file shouldn't raise errors.
self.cmd.take_action(parsed_args)

1
tripleoclient/v1/undercloud_config.py

@ -112,6 +112,7 @@ def _load_subnets_config_groups():
else:
CONF.register_opts(config.get_remote_subnet_opts(), group=g)
LOG = logging.getLogger(__name__ + ".undercloud_config")

1
tripleoclient/v1/undercloud_preflight.py

@ -34,6 +34,7 @@ from tripleoclient import utils
class FailedValidation(Exception):
pass
CONF = cfg.CONF
# We need 8 GB, leave a little room for variation in what 8 GB means on

Loading…
Cancel
Save