summaryrefslogtreecommitdiffstats
path: root/Lib/imghdr.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-23 13:25:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-07-23 13:25:06 (GMT)
commitc6ad7940517217ef4b7c400bccdcc98bd8c32f43 (patch)
treec79f34d5ddc1cb1613d589157394aca68e2f777f /Lib/imghdr.py
parentc5a11fabdb03d032f278f86e600bcdaafdb5d783 (diff)
downloadcpython-c6ad7940517217ef4b7c400bccdcc98bd8c32f43.zip
cpython-c6ad7940517217ef4b7c400bccdcc98bd8c32f43.tar.gz
cpython-c6ad7940517217ef4b7c400bccdcc98bd8c32f43.tar.bz2
use isinstance
Diffstat (limited to 'Lib/imghdr.py')
-rw-r--r--Lib/imghdr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imghdr.py b/Lib/imghdr.py
index 2fbc966..233ea33 100644
--- a/Lib/imghdr.py
+++ b/Lib/imghdr.py
@@ -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: