[Zope-Checkins] CVS: Zope/lib/python/App - ImageFile.py:1.20

Andreas Jung andreas at andreas-jung.com
Mon Aug 4 07:01:40 EDT 2003


Update of /cvs-repository/Zope/lib/python/App
In directory cvs.zope.org:/tmp/cvs-serv3703

Modified Files:
	ImageFile.py 
Log Message:
minor cleanup



=== Zope/lib/python/App/ImageFile.py 1.19 => 1.20 ===
--- Zope/lib/python/App/ImageFile.py:1.19	Tue Feb 11 12:17:04 2003
+++ Zope/lib/python/App/ImageFile.py	Mon Aug  4 06:01:35 2003
@@ -43,9 +43,7 @@
             max_age = 3600 # One hour
         self.cch = 'public,max-age=%d' % max_age
 
-        file=open(path, 'rb')
-        data=file.read()
-        file.close()
+        data = open(path, 'rb').read()
         content_type, enc=guess_content_type(path, data)
         if content_type:
             self.content_type=content_type
@@ -84,10 +82,7 @@
                     RESPONSE.setStatus(304)
                     return ''
 
-        f=open(self.path,'rb')
-        data=f.read()
-        f.close()
-        return data
+        return open(self.path,'rb').read()
 
     HEAD__roles__=None
     def HEAD(self, REQUEST, RESPONSE):




More information about the Zope-Checkins mailing list