Commit c25b51e1 authored by Jérome Perrin's avatar Jérome Perrin Committed by Xiaowu Zhang

Message: drop load/dump methods

parent e7fe05a1
...@@ -81,7 +81,6 @@ if 1: # BBB ...@@ -81,7 +81,6 @@ if 1: # BBB
getGlobalTranslationService = GlobalTranslationService getGlobalTranslationService = GlobalTranslationService
from Products.ERP5Type import Globals from Products.ERP5Type import Globals
from cPickle import dumps, loads
from string import Template from string import Template
from base64 import b64encode, b64decode from base64 import b64encode, b64decode
...@@ -102,24 +101,6 @@ class Message(Persistent): ...@@ -102,24 +101,6 @@ class Message(Persistent):
default = message default = message
self.default = default 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): def translate(self):
""" """
Return the translated message. If the original is a string object, 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