Commit 04479bf2 authored by Jérome Perrin's avatar Jérome Perrin

remove "binary_data" accessors that are not used

parent 16a8e27c
......@@ -436,12 +436,6 @@ class ERP5Conduit(XMLSyncUtilsMixin):
data = new_data
if isinstance(data, unicode):
data = data.encode(self.getEncoding())
if keyword == 'binary_data':
#LOG('ERP5Conduit.getFormatedArgs', DEBUG, 'binary_data keyword: %s' % str(keyword))
msg = MIMEBase('application','octet-stream')
encoders.encode_base64(msg)
msg.set_payload(data)
data = msg.get_payload(decode=True)
new_args[keyword] = data
return new_args
......
......@@ -2846,40 +2846,6 @@ class Base( CopyContainer,
"""
return []
security.declareProtected(Permissions.View, 'getBinaryData')
def getBinaryData(self):
"""
Return the binary data
"""
bin = None
if hasattr(self,'_original'):
bin = self._original._data()
elif hasattr(self,'_data'):
bin = self._data
elif hasattr(self,'data'):
bin = self.data
if bin is not None:
return StringIO(str(bin))
return None
security.declareProtected(Permissions.ModifyPortalContent, 'setBinaryData')
def setBinaryData(self, data):
"""
Set the binary data, data must be a cStringIO
"""
self.edit(file=data)
#LOG('Base.setBinaryData',0,'data: %s' % str(data))
#obj=''
#if hasattr(self,'_original'):
# LOG('Base.setBinaryData',0,'_original for : %s' % str(self))
# self._original.data = data
#elif hasattr(self,'_data'):
# LOG('Base.setBinaryData',0,'_data for : %s' % str(self))
# self._data = data
#elif hasattr(self,'data'):
# LOG('Base.setBinaryData',0,'data for : %s' % str(self))
# self.data = data
security.declareProtected(Permissions.AccessContentsInformation,
'getRedirectParameterDictAfterAdd')
def getRedirectParameterDictAfterAdd(self, container, **kw):
......
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