]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
imghdr.what(): check for not h'. This lets
authorGuido van Rossum <guido@python.org>
Thu, 22 Aug 1996 21:20:46 +0000 (21:20 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 22 Aug 1996 21:20:46 +0000 (21:20 +0000)
you do:
    imghdr.what(None, '')
And still go down the

Lib/imghdr.py

index 10cc08596ecfc5a4fcccc20f6d987c5487ac7e48..f3137c5afb04590d9210fefbd96e1ebf0d733ccb 100644 (file)
@@ -6,7 +6,7 @@
 #-------------------------#
 
 def what(filename, h=None):
-       if not h:
+       if h is None:
                f = open(filename, 'r')
                h = f.read(32)
        else: