[CMF-checkins] CVS: CMF - FSImage.py:1.5

tseaver@digicool.com tseaver@digicool.com
Thu, 12 Apr 2001 13:51:59 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak:/tmp/cvs-serv17913

Modified Files:
	FSImage.py 
Log Message:
* Try again on the pesky image load problem.


--- Updated File FSImage.py in package CMF --
--- FSImage.py	2001/04/12 17:15:33	1.4
+++ FSImage.py	2001/04/12 17:51:57	1.5
@@ -130,10 +130,16 @@
         # Only parse out image info if the file was changed, because this file
         # is read every time the image is requested.
         try:    mtime=os.stat(fp)[8]
-        except: mtime=-1
+        except: mtime=0
         if mtime != self._file_mod_time:
             self._file_mod_time = mtime
-            (self.content_type, self.width, self.height) = getImageInfo(data)
+        ct, width, height = getImageInfo( data )
+        if ct != getattr( self, 'content_type', None ):
+            self.content_type = ct
+        if width != getattr( self, 'width', None ):
+            self.width = width
+        if height != getattr( self, 'height', None ):
+            self.height = height
 
         return data