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],
'has_more_data': has_more_data,
}

View File

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

View File

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