[FIX] tools,addons: increased support for installation paths containing non-ascii characters

lp bug: https://launchpad.net/bugs/563029 fixed

bzr revid: odo@openerp.com-20101230014831-jefjtmgy0a10a4mk
This commit is contained in:
Olivier Dony
2010-12-30 02:48:31 +01:00
parent a8422b1b09
commit 596a464041
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ import logging
logger = netsvc.Logger()
_ad = os.path.abspath(opj(tools.config['root_path'], 'addons')) # default addons path (base)
ad_paths= map(lambda m: os.path.abspath(m.strip()),tools.config['addons_path'].split(','))
_ad = os.path.abspath(opj(tools.ustr(tools.config['root_path']), u'addons')) # default addons path (base)
ad_paths= map(lambda m: os.path.abspath(tools.ustr(m.strip())), tools.config['addons_path'].split(','))
sys.path.insert(1, _ad)
+1 -1
View File
@@ -262,7 +262,7 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
return fo
if os.path.splitext(name)[1] == '.rml':
raise IOError, 'Report %s doesn\'t exist or deleted : ' %str(name)
raise IOError, 'File not found : '+str(name)
raise IOError, 'File not found : %s' % name
#----------------------------------------------------------