Disable logging during commands discovery
authorFabien Meghazi <fme@openerp.com>
Wed, 21 May 2014 13:53:16 +0000 (15:53 +0200)
committerFabien Meghazi <fme@openerp.com>
Wed, 21 May 2014 13:53:16 +0000 (15:53 +0200)
openerp/cli/__init__.py

index 2742836..574898b 100644 (file)
@@ -47,6 +47,7 @@ def main():
 
     # Subcommand discovery
     if len(args) and not args[0].startswith("-"):
+        logging.disable(logging.CRITICAL)
         for m in module.get_modules():
             m = 'openerp.addons.' + m
             __import__(m)
@@ -54,6 +55,7 @@ def main():
             #except Exception, e:
             #    raise
             #    print e
+        logging.disable(logging.NOTSET)
         command = args[0]
         args = args[1:]