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):
|
||||
"""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):
|
||||
|
@ -58,7 +58,7 @@ def _get_root_helper():
|
||||
|
||||
def execute(*cmd, **kwargs):
|
||||
"""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()
|
||||
result = processutils.execute(*cmd, **kwargs)
|
||||
LOG.debug('Execution completed, command line is "%s"', ' '.join(cmd))
|
||||
@ -69,7 +69,7 @@ def execute(*cmd, **kwargs):
|
||||
|
||||
def trycmd(*args, **kwargs):
|
||||
"""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()
|
||||
return processutils.trycmd(*args, **kwargs)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user