[FIX] Fixed oldxml at python2.6 for Ubuntu 8.0.4,9.04

bzr revid: jvo@tinyerp.com-20090622070428-qw1fvtkwh1sot5ni
This commit is contained in:
Jay (Open ERP) 2009-06-22 12:34:28 +05:30
parent 50badb81dd
commit ec4c40909c
1 changed files with 6 additions and 3 deletions

View File

@ -42,9 +42,12 @@ import signal
# the path needs to be updated before any `import xml`
# TODO: remove PyXML dependencies, use lxml instead.
#----------------------------------------------------------
_oldxml = '/usr/lib/python%s/site-packages/oldxml' % sys.version[:3]
if os.path.exists(_oldxml):
sys.path.append(_oldxml)
_oldxml1 = '/usr/lib/python%s/site-packages/oldxml' % sys.version[:3]
_oldxml2 = '/usr/lib/python%s/dist-packages/oldxml' % sys.version[:3]
if os.path.exists(_oldxml1):
sys.path.insert(0,_oldxml1)
elif os.path.exists(_oldxml2):
sys.path.insert(0,_oldxml2)
import release