Merge "Add E123,E125 check and Solve several problems"

This commit is contained in:
Jenkins 2016-09-28 15:19:44 +00:00 committed by Gerrit Code Review
commit 7a76c470fa
3 changed files with 3 additions and 4 deletions

View File

@ -203,7 +203,7 @@ class KBRunner(object):
if not self.agent_version: if not self.agent_version:
self.agent_version = "0" self.agent_version = "0"
if (LooseVersion(self.agent_version) != LooseVersion(self.expected_agent_version))\ if (LooseVersion(self.agent_version) != LooseVersion(self.expected_agent_version))\
and (self.expected_agent_version not in vm_version_mismatches): and (self.expected_agent_version not in vm_version_mismatches):
# only warn once for each unexpected VM version # only warn once for each unexpected VM version
vm_version_mismatches.add(self.expected_agent_version) vm_version_mismatches.add(self.expected_agent_version)
LOG.warning("The VM image you are running (%s) is not the expected version (%s) " LOG.warning("The VM image you are running (%s) is not the expected version (%s) "

View File

@ -149,7 +149,7 @@ class User(object):
if flavor['vcpus'] == fcand['vcpus'] and flavor['ram'] < fcand['ram']: if flavor['vcpus'] == fcand['vcpus'] and flavor['ram'] < fcand['ram']:
fcand = flavor fcand = flavor
if flavor['vcpus'] == fcand['vcpus'] and flavor['ram'] == fcand['ram'] and\ if flavor['vcpus'] == fcand['vcpus'] and flavor['ram'] == fcand['ram'] and\
flavor['disk'] < fcand['disk']: flavor['disk'] < fcand['disk']:
fcand = flavor fcand = flavor
find_flag = True find_flag = True

View File

@ -30,13 +30,12 @@ commands = oslo_debug_helper {posargs}
[flake8] [flake8]
max-line-length = 100 max-line-length = 100
show-source = True show-source = True
# E123, E125 skipped as they are invalid PEP-8.
# H233: Python 3.x incompatible use of print operator # H233: Python 3.x incompatible use of print operator
# H236: Python 3.x incompatible __metaclass__, use six.add_metaclass() # H236: Python 3.x incompatible __metaclass__, use six.add_metaclass()
# E302: expected 2 blank linee # E302: expected 2 blank linee
# E303: too many blank lines (2) # E303: too many blank lines (2)
# H404: multi line docstring should start without a leading new line # H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line # H405: multi line docstring summary not separated with an empty line
ignore = E123,E125,H233,H236,E302,E303,H404,H405 ignore = H233,H236,E302,E303,H404,H405
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build