summaryrefslogtreecommitdiffstats
path: root/Lib/imghdr.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-22 21:20:46 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-22 21:20:46 (GMT)
commitf813f56bcdaadb127ede42b4e36935e277a26f5b (patch)
tree6ee195d3b09bc2644d8cfef4edcaf4580cc0c276 /Lib/imghdr.py
parentbf57ed5f9575b2d4499ac089c4e2e48500c6ace4 (diff)
downloadcpython-f813f56bcdaadb127ede42b4e36935e277a26f5b.zip
cpython-f813f56bcdaadb127ede42b4e36935e277a26f5b.tar.gz
cpython-f813f56bcdaadb127ede42b4e36935e277a26f5b.tar.bz2
imghdr.what(): check for not h'. This lets
you do: imghdr.what(None, '') And still go down the
Diffstat (limited to 'Lib/imghdr.py')
-rw-r--r--Lib/imghdr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imghdr.py b/Lib/imghdr.py
index 10cc085..f3137c5 100644
--- a/Lib/imghdr.py
+++ b/Lib/imghdr.py
@@ -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: