]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
comparison to None should be 'if cond is not None' 788/head
authorcloudaice <cloudaice@163.com>
Thu, 16 May 2013 09:06:41 +0000 (11:06 +0200)
committercloudaice <cloudaice@163.com>
Thu, 16 May 2013 09:06:41 +0000 (11:06 +0200)
tornado/options.py

index 8191946dfd84fa8d8b938348a9b3ce731c45c9c8..b65878028aeb85487838291e233ae4b7e0404a75 100644 (file)
@@ -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