Test for membership should be 'not in'
Enabled check for PEP8 issue E713. Change-Id: Id41f5f19796a7af8cf4cb52dd7afc2e6ec1ccbc4
This commit is contained in:
parent
3a2582a866
commit
164f963676
@ -43,7 +43,7 @@ CONF.register_opts(exc_log_opts)
|
|||||||
|
|
||||||
def _cleanse_dict(original):
|
def _cleanse_dict(original):
|
||||||
"""Strip all admin_password, new_pass, rescue_pass keys from a dict."""
|
"""Strip all admin_password, new_pass, rescue_pass keys from a dict."""
|
||||||
return dict((k, v) for k, v in original.iteritems() if not "_pass" in k)
|
return dict((k, v) for k, v in original.iteritems() if "_pass" not in k)
|
||||||
|
|
||||||
|
|
||||||
class IronicException(Exception):
|
class IronicException(Exception):
|
||||||
|
@ -58,7 +58,7 @@ def _get_root_helper():
|
|||||||
|
|
||||||
def execute(*cmd, **kwargs):
|
def execute(*cmd, **kwargs):
|
||||||
"""Convenience wrapper around oslo's execute() method."""
|
"""Convenience wrapper around oslo's execute() method."""
|
||||||
if kwargs.get('run_as_root') and not 'root_helper' in kwargs:
|
if kwargs.get('run_as_root') and 'root_helper' not in kwargs:
|
||||||
kwargs['root_helper'] = _get_root_helper()
|
kwargs['root_helper'] = _get_root_helper()
|
||||||
result = processutils.execute(*cmd, **kwargs)
|
result = processutils.execute(*cmd, **kwargs)
|
||||||
LOG.debug('Execution completed, command line is "%s"', ' '.join(cmd))
|
LOG.debug('Execution completed, command line is "%s"', ' '.join(cmd))
|
||||||
@ -69,7 +69,7 @@ def execute(*cmd, **kwargs):
|
|||||||
|
|
||||||
def trycmd(*args, **kwargs):
|
def trycmd(*args, **kwargs):
|
||||||
"""Convenience wrapper around oslo's trycmd() method."""
|
"""Convenience wrapper around oslo's trycmd() method."""
|
||||||
if kwargs.get('run_as_root') and not 'root_helper' in kwargs:
|
if kwargs.get('run_as_root') and 'root_helper' not in kwargs:
|
||||||
kwargs['root_helper'] = _get_root_helper()
|
kwargs['root_helper'] = _get_root_helper()
|
||||||
return processutils.trycmd(*args, **kwargs)
|
return processutils.trycmd(*args, **kwargs)
|
||||||
|
|
||||||
|
1
tox.ini
1
tox.ini
@ -37,6 +37,7 @@ commands = {posargs}
|
|||||||
# E711: ignored because it is normal to use "column == None" in sqlalchemy
|
# E711: ignored because it is normal to use "column == None" in sqlalchemy
|
||||||
|
|
||||||
ignore = E12,E711
|
ignore = E12,E711
|
||||||
|
select = E713
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user