Commit 7587f7df authored by Jérome Perrin's avatar Jérome Perrin Committed by Cédric Le Ninivin

Message: drop load/dump methods

parent 4a7790cd
......@@ -81,7 +81,6 @@ if 1: # BBB
getGlobalTranslationService = GlobalTranslationService
from Products.ERP5Type import Globals
from cPickle import dumps, loads
from string import Template
from base64 import b64encode, b64decode
......@@ -102,24 +101,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