From 88ccade9d5700db881f2ffc53e4a48a76e92c2db Mon Sep 17 00:00:00 2001 From: lzyeval Date: Sat, 31 Dec 2011 12:23:56 +0800 Subject: 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 --- nova/common/cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/common') diff --git a/nova/common/cfg.py b/nova/common/cfg.py index 68c505932..54940e7d9 100644 --- a/nova/common/cfg.py +++ b/nova/common/cfg.py @@ -821,7 +821,7 @@ class ConfigOpts(object): :return: False if the opt was already register, True otherwise :raises: DuplicateOptError, ArgsAlreadyParsedError """ - if self._args != None: + if self._args is not None: raise ArgsAlreadyParsedError("cannot register CLI option") if not self.register_opt(opt, group): -- cgit