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
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
fe855134
Commit
fe855134
authored
Apr 28, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message: drop load/dump methods
parent
54774f1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
product/ERP5Type/Message.py
product/ERP5Type/Message.py
+0
-19
No files found.
product/ERP5Type/Message.py
View file @
fe855134
...
...
@@ -82,7 +82,6 @@ if 1: # BBB
getGlobalTranslationService
=
GlobalTranslationService
from
Products.ERP5Type
import
Globals
from
six.moves.cPickle
import
dumps
,
loads
from
string
import
Template
from
base64
import
b64encode
,
b64decode
...
...
@@ -103,24 +102,6 @@ class Message(Persistent):
default
=
message
self
.
default
=
default
security
.
declarePublic
(
'dump'
)
def
dump
(
self
):
"""
Return a pickle version of the object
"""
return
b64encode
(
dumps
(
self
,
2
))
security
.
declarePublic
(
'load'
)
def
load
(
self
,
string
):
"""
Get properties from pickle version
"""
o
=
loads
(
b64decode
(
string
))
self
.
message
=
o
.
message
self
.
domain
=
o
.
domain
self
.
mapping
=
o
.
mapping
self
.
default
=
o
.
default
def
translate
(
self
):
"""
Return the translated message. If the original is a string object,
...
...
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