[Checkins] SVN: z3c.image/trunk/src/z3c/image/image.py another win fix

Bernd Dorn bernd.dorn at fhv.at
Thu Sep 14 11:50:30 EDT 2006


Log message for revision 70177:
  another win fix

Changed:
  U   z3c.image/trunk/src/z3c/image/image.py

-=-
Modified: z3c.image/trunk/src/z3c/image/image.py
===================================================================
--- z3c.image/trunk/src/z3c/image/image.py	2006-09-14 15:46:15 UTC (rev 70176)
+++ z3c.image/trunk/src/z3c/image/image.py	2006-09-14 15:50:30 UTC (rev 70177)
@@ -5,6 +5,8 @@
 from zope import interface
 import tempfile
 
+LengthError = (TypeError, AttributeError)
+
 class VImage(object):
     
     """a non persistent image implementation"""
@@ -19,7 +21,7 @@
     def getSize(self):
         try:
             return len(self.data)
-        except TypeError:
+        except LengthError:
             data = self.data
             if hasattr(data, 'fileno'):
                 return int(os.fstat(data.fileno())[stat.ST_SIZE])



More information about the Checkins mailing list