Commit fe855134 authored by Jérome Perrin's avatar Jérome Perrin

Message: drop load/dump methods

parent 54774f1e
......@@ -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,
......
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