From 31c3555f941798a2bf75352d42fb0cb82c1b4189 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 2 May 2013 14:36:57 +0200 Subject: [PATCH] [FIX] force module paths to be bytestrings Backport trunk Revision: 3729 revid:chm@openerp.com-20130502122806-1i9h8v0cvhb6p63q The http controllers handler crashes when there are non-ascii chars in the url path. `openerp.modules.module.ad_paths` containing unicode strings, werkzeug fail to compare the path `module` which is converted to ascii. force `module` to be bytestrings bzr revid: fme@openerp.com-20130502123657-f2sg50fq3216lh7d --- addons/web/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/http.py b/addons/web/http.py index f56778ea1ba..f618e9828a5 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -564,7 +564,7 @@ class Root(object): controllers and configure them. """ for addons_path in openerp.modules.module.ad_paths: - for module in sorted(os.listdir(addons_path)): + for module in sorted(os.listdir(str(addons_path))): if module not in addons_module: manifest_path = os.path.join(addons_path, module, '__openerp__.py') path_static = os.path.join(addons_path, module, 'static')