Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f813f56

Browse files
committed
imghdr.what(): check for not h'. This lets
you do: imghdr.what(None, '') And still go down the
1 parent bf57ed5 commit f813f56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/imghdr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#-------------------------#
77

88
def what(filename, h=None):
9-
if not h:
9+
if h is None:
1010
f = open(filename, 'r')
1111
h = f.read(32)
1212
else:

0 commit comments

Comments
 (0)