summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorlzyeval <lzyeval@gmail.com>2011-12-31 12:23:56 +0800
committerlzyeval <lzyeval@gmail.com>2012-01-04 07:32:13 +0800
commit88ccade9d5700db881f2ffc53e4a48a76e92c2db (patch)
treef8da941637a68a89705ac7e717992ac8b7d44fc7 /nova/utils.py
parent6f0ef4240fc42f3bf4e7b59cd83997edddb3c985 (diff)
downloadnova-88ccade9d5700db881f2ffc53e4a48a76e92c2db.tar.gz
nova-88ccade9d5700db881f2ffc53e4a48a76e92c2db.tar.xz
nova-88ccade9d5700db881f2ffc53e4a48a76e92c2db.zip
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
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py
index f4ee906fe..efefc5fd1 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -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(