[Python-checkins] r65194 - python/trunk/Lib/imghdr.py
benjamin.peterson
python-checkins at python.org
Wed Jul 23 15:25:06 CEST 2008
Author: benjamin.peterson
Date: Wed Jul 23 15:25:06 2008
New Revision: 65194
Log:
use isinstance
Modified:
python/trunk/Lib/imghdr.py
Modified: python/trunk/Lib/imghdr.py
==============================================================================
--- python/trunk/Lib/imghdr.py (original)
+++ python/trunk/Lib/imghdr.py Wed Jul 23 15:25:06 2008
@@ -8,7 +8,7 @@
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:
More information about the Python-checkins
mailing list