Clean-up pep8 E123-E126 warnings

Change-Id: Ia65f138f13ead6cf364298ef8c080f41659b9e5e
This commit is contained in:
Stanislav Kudriashev 2014-02-14 17:50:40 +02:00 committed by Ivan A. Melnikov
parent 5d00efdc4b
commit f5b8f3273a
13 changed files with 29 additions and 29 deletions

View File

@ -67,7 +67,7 @@ class InstallAction(action.Action):
instances,
"pre-install",
*removals
)
)
removals += ["package-uninstall", 'uninstall', "package-destroy"]
dependency_handler_class = self.distro.dependency_handler_class
@ -85,7 +85,7 @@ class InstallAction(action.Action):
{general_package: instances[general_package]},
"package-install",
*removals
)
)
removals += ['unconfigure']
self._run_phase(
@ -98,7 +98,7 @@ class InstallAction(action.Action):
instances,
"configure",
*removals
)
)
self._run_phase(
action.PhaseFunctors(
@ -110,4 +110,4 @@ class InstallAction(action.Action):
instances,
"post-install",
*removals
)
)

View File

@ -53,7 +53,7 @@ class PrepareAction(action.Action):
instances,
"download",
*removals
)
)
self._run_phase(
action.PhaseFunctors(
start=lambda i: LOG.info('Post-download patching %s.', colorizer.quote(i.name)),
@ -64,7 +64,7 @@ class PrepareAction(action.Action):
instances,
"download-patch",
*removals
)
)
removals += ["package-destroy"]
dependency_handler.package_start()
self._run_phase(
@ -77,5 +77,5 @@ class PrepareAction(action.Action):
instances,
"package",
*removals
)
)
dependency_handler.package_finish()

View File

@ -43,7 +43,7 @@ class RemoveAction(uninstall.UninstallAction):
{general_package: instances[general_package]},
"package-destroy",
*removals
)
)
removals += ['prepare', 'download', "download-patch"]
self._run_phase(
@ -56,7 +56,7 @@ class RemoveAction(uninstall.UninstallAction):
instances,
'uninstall',
*removals
)
)
removals += ['pre-install', 'post-install']
self._run_phase(
@ -69,4 +69,4 @@ class RemoveAction(uninstall.UninstallAction):
instances,
'post-uninstall',
*removals
)
)

View File

@ -39,7 +39,7 @@ class StartAction(action.Action):
instances,
"pre-start",
*removals
)
)
removals += ['stopped']
self._run_phase(
action.PhaseFunctors(
@ -51,7 +51,7 @@ class StartAction(action.Action):
instances,
"start",
*removals
)
)
self._run_phase(
action.PhaseFunctors(
start=lambda i: LOG.info('Post-starting %s.', colorizer.quote(i.name)),
@ -62,4 +62,4 @@ class StartAction(action.Action):
instances,
"post-start",
*removals
)
)

View File

@ -102,4 +102,4 @@ class StatusAction(action.Action):
component_order,
instances,
None,
)
)

View File

@ -44,4 +44,4 @@ class StopAction(action.Action):
instances,
"stopped",
*removals
)
)

View File

@ -43,7 +43,7 @@ class TestAction(action.Action):
{general_package: instances[general_package]},
"package-install-all-deps"
# no removals
)
)
self._run_phase(
action.PhaseFunctors(
start=lambda i: LOG.info('Running tests of component %s.',
@ -54,4 +54,4 @@ class TestAction(action.Action):
component_order,
instances,
None,
)
)

View File

@ -44,7 +44,7 @@ class UninstallAction(action.Action):
instances,
'unconfigure',
*removals
)
)
removals += ['post-install']
self._run_phase(
@ -57,7 +57,7 @@ class UninstallAction(action.Action):
instances,
'pre-uninstall',
*removals
)
)
removals += ['package-install', 'package-install-all-deps']
general_package = "general"
@ -73,4 +73,4 @@ class UninstallAction(action.Action):
{general_package: instances[general_package]},
"package-uninstall",
*removals
)
)

View File

@ -68,7 +68,7 @@ class PythonTestingComponent(base.Component):
def _get_pre_test_command(self):
app_dir = self.get_option('app_dir')
if (_using_testr(self.test_type, app_dir) and
not sh.isdir(sh.joinpths(app_dir, '.testrepository'))):
not sh.isdir(sh.joinpths(app_dir, '.testrepository'))):
return ['testr', 'init']
return None

View File

@ -302,7 +302,7 @@ class DependencyHandler(object):
# NOTE(aababilov): user could have changed persona, so,
# check that all requirements are downloaded
if (sh.isfile(self.downloaded_flag_file) and
self._requirements_satisfied(pips_to_download, self.download_dir)):
self._requirements_satisfied(pips_to_download, self.download_dir)):
LOG.info("All python dependencies have been already downloaded")
else:
pip_failures = []

View File

@ -121,7 +121,7 @@ class YumDependencyHandler(base.DependencyHandler):
params["no_tests"] = 0 if tests_package.get('enabled', True) else 1
params["exclude_from_test_env"] = ['./bin', './build*']
params["exclude_from_test_env"].extend(
tests_package.get("exclude_from_env", ()))
tests_package.get("exclude_from_env", ()))
return params
def _create_rpmbuild_subdirs(self):
@ -370,9 +370,9 @@ class YumDependencyHandler(base.DependencyHandler):
params["test_requires"] = test_requires_what
params["epoch"] = self.OPENSTACK_EPOCH
params["part_fn"] = lambda filename: sh.joinpths(
settings.TEMPLATE_DIR,
self.SPEC_TEMPLATE_DIR,
filename)
settings.TEMPLATE_DIR,
self.SPEC_TEMPLATE_DIR,
filename)
content = utils.load_template(self.SPEC_TEMPLATE_DIR, template_name)[1]
spec_filename = sh.joinpths(self.rpmbuild_dir, "SPECS", "%s.spec" % rpm_name)

View File

@ -44,8 +44,8 @@ def main():
action='append', help="image archive file or uri to upload to glance")
(options, args) = parser.parse_args()
# Why can't i iterate over this, sad...
if (not options.user or not options.tenant or not options.glance_uri
or not options.keystone_uri or not options.images):
if (not options.user or not options.tenant or not options.glance_uri or
not options.keystone_uri or not options.images):
parser.error("options are missing, please try -h")
logging.setupLogging(logging.DEBUG)
params = {

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,E501
ignore = H102,H302,H402,H403,E501
builtins = _
exclude = .venv,.tox,dist,doc,*egg,.git,build