From: Benjamin Peterson Date: Wed, 23 Jul 2008 13:25:06 +0000 (+0000) Subject: use isinstance X-Git-Tag: v2.6b3~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6ad7940517217ef4b7c400bccdcc98bd8c32f43;p=thirdparty%2FPython%2Fcpython.git use isinstance --- diff --git a/Lib/imghdr.py b/Lib/imghdr.py index 2fbc9661eb91..233ea33f2c55 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: