use isinstance

This commit is contained in:
Benjamin Peterson 2008-07-23 13:25:06 +00:00
parent c5a11fabdb
commit c6ad794051
1 changed files with 1 additions and 1 deletions

View File

@ -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: