Enable E112 expected an indented block

Change-Id: Ifc9aac5d4f62fe1d39da91825e9fe31143311316
This commit is contained in:
Aaron Rosen 2014-11-20 00:37:24 -08:00
parent 7560111e9d
commit b5cdbd38fe
2 changed files with 15 additions and 14 deletions

View File

@ -242,19 +242,21 @@ class CeilometerDriver(DataSourceDriver):
if trait['name'] == 'payload':
t_dict = eval(trait['value'])
for s, t in t_dict.items():
# FIXME(madhumohan): Dictionary items within the payload
# are handled as additional fields in the payload
# table. Need a better way to handle
# dictionaries or other structures within payload
# Nested dictionaries in the payload are skipped
# Lists within the dictionaries are also ignored
# FIXME(madhumohan): Dictionary items within
# the payload are handled as additional fields
# in the payload table. Need a better way to
# handle dictionaries or other structures
# within payload Nested dictionaries in the
# payload are skipped Lists within the
# dictionaries are also ignored
if type(t) == type(dict()):
for n, m in t.items():
if type(m) != type(dict()) and \
type(m) != type(list()):
# FIXME(madhumohan): Dirty workaround. A cleaner
# approach is required to handled None object in
# the data
# FIXME(madhumohan): Dirty
# workaround. A cleaner approach
# is required to handled None
# object in the data
if m is None:
m = 'None'
row_trait_tuple = \
@ -263,9 +265,9 @@ class CeilometerDriver(DataSourceDriver):
row_trait_tuple)
else:
if type(t) != type(list()):
# FIXME(madhumohan): Dirty workaround. A cleaner
# approach is required to handled None object in
# the data
# FIXME(madhumohan): Dirty workaround.
# A cleaner approach is required to
# handled None object in the data
if t is None:
t = 'None'
row_trait_tuple = (trait_id, s, t)

View File

@ -55,10 +55,9 @@ commands = python setup.py testr --no-parallel --testr-args='test_benchmark {pos
# E113 unexpected indentation
# H301 one import per line
# H233 Python 3.x incompatible
# E112 expected an indented block
show-source = True
ignore = E125,E126,E128,E129,E251,E713,F402,F811,F812,H237,H305,H307,H401,H402,H404,H405,H904,H231,E122,H301,H233,E112
ignore = E125,E126,E128,E129,E251,E713,F402,F811,F812,H237,H305,H307,H401,H402,H404,H405,H904,H231,E122,H301,H233
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py