From 596a464041fdb4b4dc9c14d5ec639dd183b56540 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 30 Dec 2010 02:48:31 +0100 Subject: [PATCH] [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 --- bin/addons/__init__.py | 4 ++-- bin/tools/misc.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 6e5bd3b567b..dcb8f3a2eb0 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -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) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 88f06749f90..390be6b7837 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -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 #----------------------------------------------------------