From c6ad7940517217ef4b7c400bccdcc98bd8c32f43 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 23 Jul 2008 13:25:06 +0000 Subject: use isinstance --- Lib/imghdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v0.12