Merge "pylint: fix too-many-nested-blocks/redefined-argument-from-local"
This commit is contained in:
commit
64542397d8
@ -54,14 +54,12 @@ disable=
|
|||||||
interface-not-implemented,
|
interface-not-implemented,
|
||||||
no-else-return,
|
no-else-return,
|
||||||
no-self-use,
|
no-self-use,
|
||||||
redefined-argument-from-local,
|
|
||||||
too-many-ancestors,
|
too-many-ancestors,
|
||||||
too-many-arguments,
|
too-many-arguments,
|
||||||
too-many-branches,
|
too-many-branches,
|
||||||
too-many-function-args,
|
too-many-function-args,
|
||||||
too-many-instance-attributes,
|
too-many-instance-attributes,
|
||||||
too-many-locals,
|
too-many-locals,
|
||||||
too-many-nested-blocks,
|
|
||||||
too-many-return-statements,
|
too-many-return-statements,
|
||||||
too-many-statements,
|
too-many-statements,
|
||||||
useless-object-inheritance
|
useless-object-inheritance
|
||||||
|
@ -56,9 +56,9 @@ class FormsetRow(horizon_tables.Row):
|
|||||||
# on this, because it sets self.cells to [], but later expects a
|
# on this, because it sets self.cells to [], but later expects a
|
||||||
# OrderedDict. We just fill self.cells with empty Cells.
|
# OrderedDict. We just fill self.cells with empty Cells.
|
||||||
cells = []
|
cells = []
|
||||||
for column in self.table.columns.values():
|
for col in self.table.columns.values():
|
||||||
cell = self.table._meta.cell_class(None, column, self)
|
cell = self.table._meta.cell_class(None, col, self)
|
||||||
cells.append((column.name or column.auto, cell))
|
cells.append((col.name or col.auto, cell))
|
||||||
self.cells = collections.OrderedDict(cells)
|
self.cells = collections.OrderedDict(cells)
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
|
@ -218,22 +218,22 @@ class BasePlugin(object):
|
|||||||
# for keystone.
|
# for keystone.
|
||||||
domain_auth = None
|
domain_auth = None
|
||||||
domain_auth_ref = None
|
domain_auth_ref = None
|
||||||
for domain_name in domains:
|
for _name in domains:
|
||||||
token = unscoped_auth_ref.auth_token
|
token = unscoped_auth_ref.auth_token
|
||||||
domain_auth = utils.get_token_auth_plugin(
|
domain_auth = utils.get_token_auth_plugin(
|
||||||
auth_url,
|
auth_url,
|
||||||
token,
|
token,
|
||||||
domain_name=domain_name)
|
domain_name=_name)
|
||||||
try:
|
try:
|
||||||
domain_auth_ref = domain_auth.get_access(session)
|
domain_auth_ref = domain_auth.get_access(session)
|
||||||
except (keystone_exceptions.ClientException,
|
except (keystone_exceptions.ClientException,
|
||||||
keystone_exceptions.AuthorizationFailure):
|
keystone_exceptions.AuthorizationFailure):
|
||||||
LOG.info('Attempted scope to domain %s failed, will attempt '
|
LOG.info('Attempted scope to domain %s failed, will attempt '
|
||||||
'to scope to another domain.', domain_name)
|
'to scope to another domain.', _name)
|
||||||
else:
|
else:
|
||||||
if len(domains) > 1:
|
if len(domains) > 1:
|
||||||
LOG.info("More than one valid domain found for user %s,"
|
LOG.info("More than one valid domain found for user %s,"
|
||||||
" scoping to %s",
|
" scoping to %s",
|
||||||
unscoped_auth_ref.user_id, domain_name)
|
unscoped_auth_ref.user_id, _name)
|
||||||
break
|
break
|
||||||
return domain_auth, domain_auth_ref
|
return domain_auth, domain_auth_ref
|
||||||
|
@ -311,9 +311,11 @@ class CreateCGroupWorkflow(workflows.Workflow):
|
|||||||
backend_name = None
|
backend_name = None
|
||||||
invalid_backend = False
|
invalid_backend = False
|
||||||
for selected_vol_type in selected_vol_types:
|
for selected_vol_type in selected_vol_types:
|
||||||
if not invalid_backend:
|
if invalid_backend:
|
||||||
|
continue
|
||||||
for vol_type in vol_types:
|
for vol_type in vol_types:
|
||||||
if selected_vol_type == vol_type.id:
|
if selected_vol_type != vol_type.id:
|
||||||
|
continue
|
||||||
if (hasattr(vol_type, "extra_specs") and
|
if (hasattr(vol_type, "extra_specs") and
|
||||||
'volume_backend_name' in vol_type.extra_specs):
|
'volume_backend_name' in vol_type.extra_specs):
|
||||||
vol_type_backend = \
|
vol_type_backend = \
|
||||||
|
Loading…
Reference in New Issue
Block a user