use isinstance
This commit is contained in:
parent
c5a11fabdb
commit
c6ad794051
|
@ -8,7 +8,7 @@ __all__ = ["what"]
|
|||
|
||||
def what(file, h=None):
|
||||
if h is None:
|
||||
if type(file) == type(''):
|
||||
if isinstance(file, basestring):
|
||||
f = open(file, 'rb')
|
||||
h = f.read(32)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue