[Zope3-checkins] SVN: Zope3/branches/zipimport-support/src/zope/
trial change to test under windows
Fred L. Drake, Jr.
fdrake at gmail.com
Wed Nov 9 17:32:47 EST 2005
Log message for revision 40014:
trial change to test under windows
Changed:
U Zope3/branches/zipimport-support/src/zope/app/publisher/browser/fileresource.py
U Zope3/branches/zipimport-support/src/zope/pagetemplate/pagetemplatefile.py
-=-
Modified: Zope3/branches/zipimport-support/src/zope/app/publisher/browser/fileresource.py
===================================================================
--- Zope3/branches/zipimport-support/src/zope/app/publisher/browser/fileresource.py 2005-11-09 22:02:23 UTC (rev 40013)
+++ Zope3/branches/zipimport-support/src/zope/app/publisher/browser/fileresource.py 2005-11-09 22:32:47 UTC (rev 40014)
@@ -18,6 +18,7 @@
import time
+from zope import filereference
from zope.publisher.interfaces import NotFound
from zope.app.publisher.browser import BrowserView
@@ -48,7 +49,7 @@
# for unit tests
def _testData(self):
- f = open(self.context.path, 'rb')
+ f = filereference.open(self.context.path, 'rb')
data = f.read()
f.close()
return data
@@ -93,7 +94,7 @@
response.setHeader('Last-Modified', file.lmh)
setCacheControl(response)
- f = open(file.path,'rb')
+ f = filereference.open(file.path,'rb')
data = f.read()
f.close()
Modified: Zope3/branches/zipimport-support/src/zope/pagetemplate/pagetemplatefile.py
===================================================================
--- Zope3/branches/zipimport-support/src/zope/pagetemplate/pagetemplatefile.py 2005-11-09 22:02:23 UTC (rev 40013)
+++ Zope3/branches/zipimport-support/src/zope/pagetemplate/pagetemplatefile.py 2005-11-09 22:32:47 UTC (rev 40014)
@@ -25,6 +25,7 @@
import re
import logging
+from zope import filereference
from zope.pagetemplate.pagetemplate import PageTemplate
DEFAULT_ENCODING = "utf-8"
@@ -72,7 +73,7 @@
def _read_file(self):
__traceback_info__ = self.filename
- f = open(self.filename, "rb")
+ f = filereference.open(self.filename, "rb")
try:
text = f.read(XML_PREFIX_MAX_LENGTH)
except:
@@ -84,7 +85,7 @@
else:
# For HTML, we really want the file read in text mode:
f.close()
- f = open(self.filename)
+ f = filereference.open(self.filename)
text = f.read()
text, type_ = self._prepare_html(text)
f.close()
More information about the Zope3-Checkins
mailing list