[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Image - Image.py:1.6
Steve Alexander
steve@cat-box.net
Mon, 11 Nov 2002 10:32:04 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Image
In directory cvs.zope.org:/tmp/cvs-serv12834/lib/python/Zope/App/OFS/Content/Image
Modified Files:
Image.py
Log Message:
replaced bare except: clause with specific errors.
=== Zope3/lib/python/Zope/App/OFS/Content/Image/Image.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/App/OFS/Content/Image/Image.py:1.5 Thu Jul 25 18:09:31 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/Image/Image.py Mon Nov 11 10:32:04 2002
@@ -108,6 +108,9 @@
b = jpeg.read(1)
width = int(w)
height = int(h)
- except: pass
+ except struct.error:
+ pass
+ except ValueError:
+ pass
return content_type, width, height