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],
|
'packages': [p.to_dict() for p in packages],
|
||||||
'has_more_data': has_more_data,
|
'has_more_data': has_more_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -183,11 +183,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
|
||||||
|
|
||||||
@ -217,8 +217,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
|
||||||
|
Loading…
Reference in New Issue
Block a user