From 91a2a059f791a00e11aa00d916cc90f432217cb2 Mon Sep 17 00:00:00 2001 From: cloudaice Date: Thu, 16 May 2013 11:06:41 +0200 Subject: [PATCH] comparison to None should be 'if cond is not None' --- tornado/options.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tornado/options.py b/tornado/options.py index 8191946df..b65878028 100644 --- a/tornado/options.py +++ b/tornado/options.py @@ -360,11 +360,11 @@ class _Option(object): raise Error("Option %r is required to be a list of %s" % (self.name, self.type.__name__)) for item in value: - if item != None and not isinstance(item, self.type): + if item is not None and not isinstance(item, self.type): raise Error("Option %r is required to be a list of %s" % (self.name, self.type.__name__)) else: - if value != None and not isinstance(value, self.type): + if value is not None and not isinstance(value, self.type): raise Error("Option %r is required to be a %s (%s given)" % (self.name, self.type.__name__, type(value))) self._value = value -- 2.47.2