diff options
author | Guido van Rossum <guido@python.org> | 1996-08-22 21:20:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-22 21:20:46 (GMT) |
commit | f813f56bcdaadb127ede42b4e36935e277a26f5b (patch) | |
tree | 6ee195d3b09bc2644d8cfef4edcaf4580cc0c276 | |
parent | bf57ed5f9575b2d4499ac089c4e2e48500c6ace4 (diff) | |
download | cpython-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
-rw-r--r-- | Lib/imghdr.py | 2 |
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: |