mirror of https://github.com/python/cpython.git
imghdr.what(): check for not h'. This lets
you do: imghdr.what(None, '') And still go down the
This commit is contained in:
parent
bf57ed5f95
commit
f813f56bcd
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue