mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue