summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-01-28 14:35:49 +0800
committerZhongyue Luo <zhongyue.nah@intel.com>2013-01-28 15:47:12 +0800
commite3e5e0ebce00e73ad5d206205fded6a5dc1317ae (patch)
tree890752700c4d777b69c574d32f1d9674abd892f8 /openstack/common
parent9af21e843f354f95c46d2c0388b815a4f6ba06b6 (diff)
downloadoslo-e3e5e0ebce00e73ad5d206205fded6a5dc1317ae.tar.gz
oslo-e3e5e0ebce00e73ad5d206205fded6a5dc1317ae.tar.xz
oslo-e3e5e0ebce00e73ad5d206205fded6a5dc1317ae.zip
Fixes "is not", "not in" syntax usage.
Replaced "not ... is" to "is not" Replaced "not ... in" to "not in" Removed a redundant parenthesis Change-Id: I9564ab1207ccdcb32d7c2bb9e8f29658b2232ff9
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/cfg.py10
-rw-r--r--openstack/common/rpc/impl_zmq.py2
-rw-r--r--openstack/common/wsgi.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/openstack/common/cfg.py b/openstack/common/cfg.py
index 0d8e6da..527a5a5 100644
--- a/openstack/common/cfg.py
+++ b/openstack/common/cfg.py
@@ -863,7 +863,7 @@ class SubCommandOpt(Opt):
description=self.description,
help=self.help)
- if not self.handler is None:
+ if self.handler is not None:
self.handler(subparsers)
@@ -1547,8 +1547,8 @@ class ConfigOpts(collections.Mapping):
group = group_or_name if isinstance(group_or_name, OptGroup) else None
group_name = group.name if group else group_or_name
- if not group_name in self._groups:
- if not group is None or not autocreate:
+ if group_name not in self._groups:
+ if group is not None or not autocreate:
raise NoSuchGroupError(group_name)
self.register_group(OptGroup(name=group_name))
@@ -1568,7 +1568,7 @@ class ConfigOpts(collections.Mapping):
group = self._get_group(group)
opts = group._opts
- if not opt_name in opts:
+ if opt_name not in opts:
raise NoSuchOptError(opt_name, group)
return opts[opt_name]
@@ -1606,7 +1606,7 @@ class ConfigOpts(collections.Mapping):
opt = info['opt']
if opt.required:
- if ('default' in info or 'override' in info):
+ if 'default' in info or 'override' in info:
continue
if self._get(opt.dest, group) is None:
diff --git a/openstack/common/rpc/impl_zmq.py b/openstack/common/rpc/impl_zmq.py
index ee313eb..86d2bc5 100644
--- a/openstack/common/rpc/impl_zmq.py
+++ b/openstack/common/rpc/impl_zmq.py
@@ -449,7 +449,7 @@ class ZmqProxy(ZmqBaseReactor):
else:
sock_type = zmq.PUSH
- if not topic in self.topic_proxy:
+ if topic not in self.topic_proxy:
def publisher(waiter):
LOG.info(_("Creating proxy for topic: %s"), topic)
diff --git a/openstack/common/wsgi.py b/openstack/common/wsgi.py
index 1d6d9df..f0096d3 100644
--- a/openstack/common/wsgi.py
+++ b/openstack/common/wsgi.py
@@ -257,7 +257,7 @@ class Request(webob.Request):
Does not do any body introspection, only checks header
"""
- if not "Content-Type" in self.headers:
+ if "Content-Type" not in self.headers:
return None
content_type = self.content_type