Merge "Clean up flake8 ignore list"

This commit is contained in:
Jenkins 2016-01-18 13:42:00 +00:00 committed by Gerrit Code Review
commit facca13dc4
3 changed files with 5 additions and 8 deletions

View File

@ -42,10 +42,8 @@ commands =
--output-file etc/watcher/watcher.conf.sample --output-file etc/watcher/watcher.conf.sample
[flake8] [flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source=True show-source=True
ignore=E123,E125 ignore=
builtins= _ builtins= _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*sqlalchemy/alembic/versions/*,demo/ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*sqlalchemy/alembic/versions/*,demo/

View File

@ -69,8 +69,7 @@ class ParsableErrorMiddleware(object):
if (state['status_code'] // 100) not in (2, 3): if (state['status_code'] // 100) not in (2, 3):
req = webob.Request(environ) req = webob.Request(environ)
if (req.accept.best_match(['application/json', 'application/xml'] if (req.accept.best_match(['application/json', 'application/xml']
) == 'application/xml' ) == 'application/xml'):
):
try: try:
# simple check xml is valid # simple check xml is valid
body = [et.ElementTree.tostring( body = [et.ElementTree.tostring(

View File

@ -180,9 +180,9 @@ class OutletTempControl(BaseStrategy):
cores_available = cap_cores.get_capacity(host) - cores_used cores_available = cap_cores.get_capacity(host) - cores_used
disk_available = cap_disk.get_capacity(host) - mem_used disk_available = cap_disk.get_capacity(host) - mem_used
mem_available = cap_mem.get_capacity(host) - disk_used mem_available = cap_mem.get_capacity(host) - disk_used
if cores_available >= required_cores and \ if cores_available >= required_cores \
disk_available >= required_disk and \ and disk_available >= required_disk \
mem_available >= required_mem: and mem_available >= required_mem:
dest_servers.append(hvmap) dest_servers.append(hvmap)
return dest_servers return dest_servers