From: Guido van Rossum Date: Thu, 22 Aug 1996 21:20:46 +0000 (+0000) Subject: imghdr.what(): check for not h'. This lets X-Git-Tag: v1.4b3~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f813f56bcdaadb127ede42b4e36935e277a26f5b;p=thirdparty%2FPython%2Fcpython.git 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 10cc08596ecf..f3137c5afb04 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: