Commit 6684d553 authored by Kevin Deldycke's avatar Kevin Deldycke

Support python 2.4 and python 2.3


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6089 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 092a1ccd
...@@ -32,13 +32,24 @@ from Products.PythonScripts.Utility import allow_class ...@@ -32,13 +32,24 @@ from Products.PythonScripts.Utility import allow_class
from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
from Globals import get_request from Globals import get_request
from cPickle import dumps, loads from cPickle import dumps, loads
from base64 import b64encode, b64decode
try: try:
from string import Template from string import Template
except ImportError: except ImportError:
from Products.ERP5Type.patches.string import Template from Products.ERP5Type.patches.string import Template
# API of base64 has changed between python v2.3 and v2.4
import base64
try:
# python v2.4 API
b64encode = base64.b64encode
b64decode = base64.b64decode
except AttributeError:
# python v2.3 API
b64encode = base64.encodestring
b64decode = base64.decodestring
class Message(Persistent): class Message(Persistent):
""" """
......
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