commit | f813f56bcdaadb127ede42b4e36935e277a26f5b | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Aug 22 21:20:46 1996 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Aug 22 21:20:46 1996 +0000 |
tree | 6ee195d3b09bc2644d8cfef4edcaf4580cc0c276 | |
parent | bf57ed5f9575b2d4499ac089c4e2e48500c6ace4 [diff] |
imghdr.what(): check for not h'. This lets you do: imghdr.what(None, '') And still go down the
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: