mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +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):
|
def what(filename, h=None):
|
||||||
if not h:
|
if h is None:
|
||||||
f = open(filename, 'r')
|
f = open(filename, 'r')
|
||||||
h = f.read(32)
|
h = f.read(32)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue