commit | c6ad7940517217ef4b7c400bccdcc98bd8c32f43 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Wed Jul 23 13:25:06 2008 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Wed Jul 23 13:25:06 2008 +0000 |
tree | c79f34d5ddc1cb1613d589157394aca68e2f777f | |
parent | c5a11fabdb03d032f278f86e600bcdaafdb5d783 [diff] [blame] |
use isinstance
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 @@ 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: