Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
04479bf2
Commit
04479bf2
authored
Feb 01, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove "binary_data" accessors that are not used
parent
16a8e27c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
40 deletions
+0
-40
product/ERP5SyncML/Conduit/ERP5Conduit.py
product/ERP5SyncML/Conduit/ERP5Conduit.py
+0
-6
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+0
-34
No files found.
product/ERP5SyncML/Conduit/ERP5Conduit.py
View file @
04479bf2
...
@@ -436,12 +436,6 @@ class ERP5Conduit(XMLSyncUtilsMixin):
...
@@ -436,12 +436,6 @@ class ERP5Conduit(XMLSyncUtilsMixin):
data = new_data
data = new_data
if isinstance(data, unicode):
if isinstance(data, unicode):
data = data.encode(self.getEncoding())
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
new_args[keyword] = data
return new_args
return new_args
...
...
product/ERP5Type/Base.py
View file @
04479bf2
...
@@ -2846,40 +2846,6 @@ class Base( CopyContainer,
...
@@ -2846,40 +2846,6 @@ class Base( CopyContainer,
"""
"""
return
[]
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
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRedirectParameterDictAfterAdd'
)
'getRedirectParameterDictAfterAdd'
)
def
getRedirectParameterDictAfterAdd
(
self
,
container
,
**
kw
):
def
getRedirectParameterDictAfterAdd
(
self
,
container
,
**
kw
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment