Fix the run_test unchecked pep8 W503 errors
Now thw flake8 did not check W503 error, W503:doesn't allow binary ops at start of line, And this patch fixes it. Change-Id: I7b2cccee662bbabac381e82cad221803618f3065
This commit is contained in:
parent
9f25a517da
commit
f9171339ff
@ -63,5 +63,3 @@ class Packages(generic.View):
|
||||
'packages': [p.to_dict() for p in packages],
|
||||
'has_more_data': has_more_data,
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -183,11 +183,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
|
||||
|
||||
@ -217,8 +217,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
|
||||
|
Loading…
Reference in New Issue
Block a user