Merge "Fix the run_test unchecked pep8 W503 errors"

This commit is contained in:
Jenkins 2015-12-10 14:31:52 +00:00 committed by Gerrit Code Review
commit fac66c53b3
3 changed files with 9 additions and 11 deletions

View File

@ -63,5 +63,3 @@ class Packages(generic.View):
'packages': [p.to_dict() for p in packages], 'packages': [p.to_dict() for p in packages],
'has_more_data': has_more_data, 'has_more_data': has_more_data,
} }

View File

@ -82,8 +82,8 @@ def get_available_networks(request, include_subnets=True,
cidr=subnet.cidr, cidr=subnet.cidr,
subnet=subnet.name_or_id)) subnet=subnet.name_or_id))
network_choices.append(((net.id, subnet.id), netname network_choices.append(
or full_name)) ((net.id, subnet.id), netname or full_name))
else: else:
netname = netname or net.name_or_id netname = netname or net.name_or_id

View File

@ -185,11 +185,11 @@ class DeployEnvironment(tables.BatchAction):
or successful deploy or delete failure) or successful deploy or delete failure)
""" """
status = getattr(environment, 'status', None) status = getattr(environment, 'status', None)
if (status != consts.STATUS_ID_DEPLOY_FAILURE if (status != consts.STATUS_ID_DEPLOY_FAILURE and
and not environment.has_new_services): not environment.has_new_services):
return False return False
if (status in consts.NO_ACTION_ALLOWED_STATUSES if (status in consts.NO_ACTION_ALLOWED_STATUSES or
or status == consts.STATUS_ID_READY): status == consts.STATUS_ID_READY):
return False return False
return True return True
@ -219,8 +219,8 @@ class DeployThisEnvironment(tables.Action):
""" """
status, version = _get_environment_status_and_version(request, status, version = _get_environment_status_and_version(request,
self.table) self.table)
if (status in consts.NO_ACTION_ALLOWED_STATUSES if (status in consts.NO_ACTION_ALLOWED_STATUSES or
or status == consts.STATUS_ID_READY): status == consts.STATUS_ID_READY):
return False return False
apps = self.table.data apps = self.table.data