[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
This commit is contained in:
Fabien Meghazi 2013-05-02 14:36:57 +02:00
parent a20b482a50
commit 31c3555f94
1 changed files with 1 additions and 1 deletions

View File

@ -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')