Clean-up pep8 E127 warnings
Change-Id: I144bb6e06ce318bbd42f2ea0a2f5875499c18e26
This commit is contained in:
parent
b295086082
commit
f677ef0c4f
@ -225,7 +225,7 @@ def main():
|
||||
except excp.PermException as e:
|
||||
print_exc(e)
|
||||
print(("This program should be running via %s as it performs some root-only commands is it not?")
|
||||
% (colorizer.quote('sudo', quote_color='red')))
|
||||
% (colorizer.quote('sudo', quote_color='red')))
|
||||
return 2
|
||||
except excp.OptionException as e:
|
||||
print_exc(e)
|
||||
|
@ -26,8 +26,8 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
# Sync db command
|
||||
SYNC_DB_CMD = ['sudo', '-u', 'cinder', '/usr/bin/cinder-manage',
|
||||
# Available commands:
|
||||
'db', 'sync']
|
||||
# Available commands:
|
||||
'db', 'sync']
|
||||
|
||||
|
||||
class CinderInstaller(binstall.PythonInstallComponent):
|
||||
|
@ -123,8 +123,8 @@ class DBInstaller(binstall.PkgInstallComponent):
|
||||
cmds = [{'cmd': pwd_cmd}]
|
||||
utils.execute_template(*cmds, params=params)
|
||||
except IOError:
|
||||
LOG.warn(("Couldn't set your db password. It might have already been "
|
||||
"set by a previous process."))
|
||||
LOG.warn(("Couldn't set your db password. It might have already "
|
||||
"been set by a previous process."))
|
||||
|
||||
# Ensure access granted
|
||||
dbhelper.grant_permissions(dbtype,
|
||||
|
@ -206,7 +206,7 @@ class Unpacker(object):
|
||||
pieces.append("%s (kernel image)" % (colorizer.quote(kernel_fn)))
|
||||
if pieces:
|
||||
utils.log_iterable(pieces, logger=LOG,
|
||||
header="Found %s images from a %s" % (len(pieces), src_type))
|
||||
header="Found %s images from a %s" % (len(pieces), src_type))
|
||||
|
||||
def _unpack_dir(self, dir_path):
|
||||
"""Pick through a directory to figure out which files are which
|
||||
@ -444,7 +444,7 @@ class UploadService(object):
|
||||
LOG.exception('Failed fetching needed clients for image calls due to: %s', e)
|
||||
return am_installed
|
||||
utils.log_iterable(urls, logger=LOG,
|
||||
header="Attempting to download+extract+upload %s images" % len(urls))
|
||||
header="Attempting to download+extract+upload %s images" % len(urls))
|
||||
for url in urls:
|
||||
try:
|
||||
img_handle = Image(client, url,
|
||||
|
@ -188,6 +188,6 @@ class NovaRuntime(bruntime.OpenStackRuntime):
|
||||
LOG.info("Libvirt virtualization type %s seems to be working and running.", colorizer.quote(virt_type))
|
||||
except excp.ProcessExecutionError as e:
|
||||
msg = ("Libvirt type %r does not seem to be active or configured correctly, "
|
||||
"perhaps you should be using %r instead: %s" %
|
||||
(virt_type, lv.DEF_VIRT_TYPE, e))
|
||||
"perhaps you should be using %r instead: %s" %
|
||||
(virt_type, lv.DEF_VIRT_TYPE, e))
|
||||
raise excp.StartException(msg)
|
||||
|
@ -103,10 +103,10 @@ class ProcessExecutionError(IOError):
|
||||
if not self.stdout:
|
||||
self.stdout = ''
|
||||
message = ('%s\nCommand: %s\n'
|
||||
'Exit code: %s\nStdout: %r\n'
|
||||
'Stderr: %r' % (self.description, self.cmd,
|
||||
self.exit_code, self.stdout,
|
||||
self.stderr))
|
||||
'Exit code: %s\nStdout: %r\n'
|
||||
'Stderr: %r' % (self.description, self.cmd,
|
||||
self.exit_code, self.stdout,
|
||||
self.stderr))
|
||||
IOError.__init__(self, message)
|
||||
|
||||
|
||||
|
@ -211,11 +211,11 @@ def parse(previous_settings=None):
|
||||
|
||||
test_group = OptionGroup(parser, "Test specific options")
|
||||
test_group.add_option('-i', "--ignore-failures",
|
||||
action="store_true",
|
||||
dest="ignore_test_failures",
|
||||
default=False,
|
||||
help=("when running tests ignore component test failures"
|
||||
" (default: %default)"))
|
||||
action="store_true",
|
||||
dest="ignore_test_failures",
|
||||
default=False,
|
||||
help=("when running tests ignore component test failures"
|
||||
" (default: %default)"))
|
||||
parser.add_option_group(test_group)
|
||||
|
||||
# Extract only what we care about, these will be passed
|
||||
|
@ -35,7 +35,7 @@ def get_token():
|
||||
|
||||
def replace_services_endpoints(token, options):
|
||||
client = importer.construct_entry_point("keystoneclient.v2_0.client:Client",
|
||||
token=token, endpoint=options.keystone_uri)
|
||||
token=token, endpoint=options.keystone_uri)
|
||||
current_endpoints = client.endpoints.list()
|
||||
current_services = client.services.list()
|
||||
|
||||
|
2
tox.ini
2
tox.ini
@ -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,E501
|
||||
ignore = H102,H302,H402,H403,E123,E124,E125,E126,E501
|
||||
builtins = _
|
||||
exclude = .venv,.tox,dist,doc,*egg,.git,build
|
||||
|
Loading…
x
Reference in New Issue
Block a user