Merge "Clean up flake8 ignore list"
This commit is contained in:
commit
facca13dc4
4
tox.ini
4
tox.ini
@ -42,10 +42,8 @@ commands =
|
||||
--output-file etc/watcher/watcher.conf.sample
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
show-source=True
|
||||
ignore=E123,E125
|
||||
ignore=
|
||||
builtins= _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*sqlalchemy/alembic/versions/*,demo/
|
||||
|
||||
|
@ -69,8 +69,7 @@ class ParsableErrorMiddleware(object):
|
||||
if (state['status_code'] // 100) not in (2, 3):
|
||||
req = webob.Request(environ)
|
||||
if (req.accept.best_match(['application/json', 'application/xml']
|
||||
) == 'application/xml'
|
||||
):
|
||||
) == 'application/xml'):
|
||||
try:
|
||||
# simple check xml is valid
|
||||
body = [et.ElementTree.tostring(
|
||||
|
@ -180,9 +180,9 @@ class OutletTempControl(BaseStrategy):
|
||||
cores_available = cap_cores.get_capacity(host) - cores_used
|
||||
disk_available = cap_disk.get_capacity(host) - mem_used
|
||||
mem_available = cap_mem.get_capacity(host) - disk_used
|
||||
if cores_available >= required_cores and \
|
||||
disk_available >= required_disk and \
|
||||
mem_available >= required_mem:
|
||||
if cores_available >= required_cores \
|
||||
and disk_available >= required_disk \
|
||||
and mem_available >= required_mem:
|
||||
dest_servers.append(hvmap)
|
||||
|
||||
return dest_servers
|
||||
|
Loading…
Reference in New Issue
Block a user