diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2009-01-15 17:28:15 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2009-01-15 17:28:15 +0100 |
| commit | 863785242d6d01fbccdd943666b10596792a5513 (patch) | |
| tree | 8f19caafaf6d882357334176c2cc9164456c78c4 /bin/addons/base/module/module.py | |
| parent | 8edf442785c436a9dafef815486985448da83386 (diff) | |
[FIX] avoid a crash when installing a language for a non present but installed module
lp bug: https://launchpad.net/bugs/314449 fixed
bzr revid: christophe@tinyerp.com-20090115162815-xjnwwrgn211p5sa3
Diffstat (limited to 'bin/addons/base/module/module.py')
| -rw-r--r-- | bin/addons/base/module/module.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 35c1e9f48ca..a4f822a5e16 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -462,9 +462,12 @@ class module(osv.osv): for mod in self.browse(cr, uid, ids): if mod.state != 'installed': continue - + modpath = addons.get_module_path(mod.name) + if not modpath: + # unable to find the module. we skip + continue for lang in filter_lang: - f = os.path.join(addons.get_module_path(mod.name), 'i18n', lang + '.po') + f = os.path.join(modpath, 'i18n', lang + '.po') if os.path.exists(f): logger.notifyChannel("init", netsvc.LOG_INFO, 'module %s: loading translation file for language %s' % (mod.name, lang)) tools.trans_load(cr.dbname, f, lang, verbose=False) |
