PEP8 type comparison cleanup

Fixes bug #910295

The None, True, and False values are singletons.

All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.

"== None", "== True", "== False", and "!= None" comparisons in sqlalchemy's
where(), or_(), filter(), and_(), and select() functions should not be changed.

Incorrect comparisons or evaluations in comments were not changed.

Change-Id: I087f0883bf115b5fe714ccfda86a794b9b2a87f7
This commit is contained in:
lzyeval
2011-12-31 12:23:56 +08:00
parent c3b17f1635
commit 49e00413a6

View File

@@ -213,7 +213,7 @@ def execute(*cmd, **kwargs):
_returncode = obj.returncode # pylint: disable=E1101
if _returncode:
LOG.debug(_('Result was %s') % _returncode)
if ignore_exit_code == False \
if not ignore_exit_code \
and _returncode not in check_exit_code:
(stdout, stderr) = result
raise exception.ProcessExecutionError(