Commit a0497874 authored by Julien Muchembled's avatar Julien Muchembled

Stop using deprecated expandpath in FSZSQLMethod patch (like in CMF 2.2)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39200 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e74735d
...@@ -7,15 +7,14 @@ ...@@ -7,15 +7,14 @@
# #
from Products.CMFCore.FSZSQLMethod import FSZSQLMethod from Products.CMFCore.FSZSQLMethod import FSZSQLMethod
from Products.CMFCore.utils import expandpath
from Products.ZSQLMethods.SQL import SQL from Products.ZSQLMethods.SQL import SQL
def FSZSQLMethod_readFile(self, reparse): def FSZSQLMethod_readFile(self, reparse):
fp = expandpath(self._filepath) file = open(self._filepath, 'r') # not 'rb', as this is a text file!
file = open(fp, 'r') # not 'rb', as this is a text file!
try: try:
data = file.read() data = file.read()
finally: file.close() finally:
file.close()
RESPONSE = {} RESPONSE = {}
RESPONSE['BODY'] = data RESPONSE['BODY'] = data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment