Clean-up pep8 E128 warnings

Change-Id: I07617dcb02ae18b5318f9bb4c06e2b10fa38646e
This commit is contained in:
skudriashev 2014-02-14 00:35:33 +02:00 committed by Stanislav Kudriashev
parent fb8871288a
commit b295086082
8 changed files with 31 additions and 23 deletions

View File

@ -185,7 +185,7 @@ class ServiceRuntime(ProgramRuntime):
sh.execute(start_cmd, shell=True)
except excp.ProcessExecutionError:
LOG.error("Failed to start program %s under component %s.",
colorizer.quote(program), self.name)
colorizer.quote(program), self.name)
return False
return True
@ -205,7 +205,7 @@ class ServiceRuntime(ProgramRuntime):
sh.execute(stop_cmd, shell=True)
except excp.ProcessExecutionError:
LOG.error("Failed to stop program %s under component %s.",
colorizer.quote(program), self.name)
colorizer.quote(program), self.name)
return False
return True

View File

@ -111,8 +111,13 @@ class Unpacker(object):
kernel_fn = None
ramdisk_fn = None
img_fn = None
utils.log_iterable(files, logger=LOG,
header="Looking at %s files from %s to find the kernel/ramdisk/root images" % (len(files), colorizer.quote(files_location)))
utils.log_iterable(
files,
logger=LOG,
header="Looking at %s files from %s to find the "
"kernel/ramdisk/root images" %
(len(files), colorizer.quote(files_location))
)
for fn in files:
if self._pat_checker(fn, KERNEL_CHECKS):

View File

@ -26,8 +26,10 @@ class Initializer(object):
def __init__(self, service_token, admin_uri):
# Late load since its using a client lib that is only avail after install...
self.client = importer.construct_entry_point("keystoneclient.v2_0.client:Client",
token=service_token, endpoint=admin_uri)
self.client = importer.construct_entry_point(
"keystoneclient.v2_0.client:Client",
token=service_token, endpoint=admin_uri
)
def _create_tenants(self, tenants):
tenants_made = dict()
@ -188,8 +190,8 @@ def get_shared_params(ip, service_token, admin_password, service_password,
'host': keystone_auth_host,
},
'admin_templated': {
'uri': utils.make_url(keystone_auth_proto,
keystone_auth_host, port='$(admin_port)s', path="v2.0"),
'uri': utils.make_url(keystone_auth_proto, keystone_auth_host,
port='$(admin_port)s', path="v2.0"),
'protocol': keystone_auth_proto,
'host': keystone_auth_host,
},
@ -201,7 +203,8 @@ def get_shared_params(ip, service_token, admin_password, service_password,
},
'public_templated': {
'uri': utils.make_url(keystone_service_proto,
keystone_service_host, port='$(public_port)s', path="v2.0"),
keystone_service_host,
port='$(public_port)s', path="v2.0"),
'protocol': keystone_service_proto,
'host': keystone_service_host,
},

View File

@ -142,8 +142,9 @@ class Virsh(object):
if domain.startswith(inst_prefix):
kill_domains.append(domain)
if kill_domains:
utils.log_iterable(kill_domains, logger=LOG,
header="Found %s old domains to destroy" % (len(kill_domains)))
header = ("Found %s old domains to destroy" %
len(kill_domains))
utils.log_iterable(kill_domains, logger=LOG, header=header)
for domain in sorted(kill_domains):
self._destroy_domain(libvirt, ch, domain)
except libvirt.libvirtError as e:

View File

@ -112,10 +112,10 @@ class RabbitRuntime(bruntime.ProgramRuntime):
st = bruntime.STATUS_STARTED
return [
bruntime.ProgramStatus(status=st,
details={
'STDOUT': sysout,
'STDERR': stderr,
}),
details={
'STDOUT': sysout,
'STDERR': stderr
})
]
def _run_action(self, action, check_exit_code=True):

View File

@ -194,7 +194,7 @@ class YumDependencyHandler(base.DependencyHandler):
continue
utils.log_iterable(src_repo_files,
header=('Building %s RPM packages from their'
' SRPMs for repo %s using %s jobs') %
' SRPMs for repo %s using %s jobs') %
(len(src_repo_files), self.SRC_REPOS[repo_name], self._jobs),
logger=LOG)
rpmbuild_flags = "--rebuild"

View File

@ -14,11 +14,10 @@ if __name__ == "__main__":
data = yaml.load(fh.read())
fh.close()
formatted = yaml.dump(data,
line_break="\n",
indent=4,
explicit_start=True,
explicit_end=True,
default_flow_style=False,
)
line_break="\n",
indent=4,
explicit_start=True,
explicit_end=True,
default_flow_style=False)
print("# Formatted %s" % (fn))
print(formatted)

View File

@ -37,6 +37,6 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
commands = {posargs}
[flake8]
ignore = H102,H302,H402,H403,E123,E124,E125,E126,E127,E128,E501
ignore = H102,H302,H402,H403,E123,E124,E125,E126,E127,E501
builtins = _
exclude = .venv,.tox,dist,doc,*egg,.git,build