diff options
author | Christian Berendt <berendt@b1-systems.de> | 2014-06-03 08:22:57 +0200 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@redhat.com> | 2014-06-16 13:19:11 +0200 |
commit | 164f9636764ee8f9a7582ef5d97cd0b3c98a2fbf (patch) | |
tree | 8145b592fe38da95475301007ca2d009a2c03a9a /ironic/common/utils.py | |
parent | 3a2582a86615464779e7545275aa93fdc50d29ea (diff) | |
download | ironic-164f9636764ee8f9a7582ef5d97cd0b3c98a2fbf.tar.gz |
Test for membership should be 'not in'
Enabled check for PEP8 issue E713.
Change-Id: Id41f5f19796a7af8cf4cb52dd7afc2e6ec1ccbc4
Diffstat (limited to 'ironic/common/utils.py')
-rw-r--r-- | ironic/common/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ironic/common/utils.py b/ironic/common/utils.py index 4cbb608cb..213771f97 100644 --- a/ironic/common/utils.py +++ b/ironic/common/utils.py @@ -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) |