Enable H231 check

Change-Id: Id03b9d6f663cdc1df857de0b92a8f2c402a91608
Closes-Bug: #1398557
This commit is contained in:
Abhishek Chanda 2014-12-14 16:14:03 +05:30
parent b0904daf9c
commit ca58962e39
3 changed files with 4 additions and 5 deletions

View File

@ -126,7 +126,7 @@ class d6Cage(deepSix):
try:
reload(sys.modules[moduleName])
except Exception, errmsg:
except Exception as errmsg:
self.log_error(
"Unable to reload module '%s': %s", moduleName, errmsg)
return
@ -243,7 +243,7 @@ class d6Cage(deepSix):
interval=5)
self.publish('services', self.services)
except Exception, errmsg:
except Exception as errmsg:
del self.services[name]
raise DataServiceError(
"error starting service '%s': %s" % (name, errmsg))

View File

@ -888,7 +888,7 @@ class TestDatasourceDriver(base.TestCase):
try:
TestDriver().get_schema()
except exception.DuplicateTableName, e:
except exception.DuplicateTableName as e:
self.assertTrue('table (testtable) used twice' in str(e))
else:
self.fail("Expected InvalidParamException but got none")

View File

@ -45,12 +45,11 @@ commands = python setup.py testr --no-parallel --testr-args='test_benchmark {pos
# H401 docstring should not start with a space
# H405 multi line docstring summary not separated with an empty line
# H904 Wrap long lines in parentheses instead of a backslash
# H231 Python 3.x incompatible
# E113 unexpected indentation
# H302 import only modules
show-source = True
ignore = E128,E129,E251,F402,F811,F812,H237,H305,H401,H405,H904,H231,H302
ignore = E128,E129,E251,F402,F811,F812,H237,H305,H401,H405,H904,H302
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py