]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use is None rather than general boolean
authorRaymond Hettinger <python@rcn.com>
Fri, 31 May 2002 23:54:44 +0000 (23:54 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 31 May 2002 23:54:44 +0000 (23:54 +0000)
Lib/cgi.py

index a7ad5bf01f3fa61fc559f63653afa3a98854e633..14ebeb966f792e908a45dfc8855f059137d677d0 100755 (executable)
@@ -128,7 +128,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
             If false (the default), errors are silently ignored.
             If true, errors raise a ValueError exception.
     """
-    if not fp:
+    if fp is None:
         fp = sys.stdin
     if not environ.has_key('REQUEST_METHOD'):
         environ['REQUEST_METHOD'] = 'GET'       # For testing stand-alone