[FIX] cli: Backport client command discovery optimization

Lazy load modules to avoid import of unmet dependencies such as ldap.
Daniel Reis 2015-04-16 09:45:39 +01:00 committed by Antony Lesuisse
parent 99a7d530e0
commit e20cf77ce0
1 changed files with 3 additions and 6 deletions

View File

@ -56,12 +56,9 @@ def main():
if len(args) and not args[0].startswith("-"):
for m in module.get_modules():
m = 'openerp.addons.' + m
#except Exception, e:
# raise
# print e
m_path = module.get_module_path(m)
if os.path.isdir(os.path.join(m_path, 'cli')):
__import__('openerp.addons.' + m)
command = args[0]
args = args[1:]