From f813f56bcdaadb127ede42b4e36935e277a26f5b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 22 Aug 1996 21:20:46 +0000 Subject: imghdr.what(): check for not h'. This lets you do: imghdr.what(None, '') And still go down the --- Lib/imghdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v0.12