[IMP] standalone: log exception when standalone fails
Currently the exception is not logged using the logger meaning that the only indication of the failure is the "module not loaded" error message. Catching the exception to log it the proper way will help identifying the cause of the issue, mainly for uninstall tests. closes odoo/odoo#100431 X-original-commit: b16f850d9aa438aea91b8cbd7c33692e1e1b2f90 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit is contained in:
@@ -163,9 +163,12 @@ if __name__ == '__main__':
|
||||
logging.getLogger('odoo.modules.loading').setLevel(logging.CRITICAL)
|
||||
logging.getLogger('odoo.sql_db').setLevel(logging.CRITICAL)
|
||||
|
||||
if args.uninstall:
|
||||
test_uninstall(args)
|
||||
elif args.standalone:
|
||||
test_scripts(args)
|
||||
else:
|
||||
test_full(args)
|
||||
try:
|
||||
if args.uninstall:
|
||||
test_uninstall(args)
|
||||
elif args.standalone:
|
||||
test_scripts(args)
|
||||
else:
|
||||
test_full(args)
|
||||
except Exception as e:
|
||||
_logger.exception("An error occured during standalone tests: %s", e)
|
||||
|
||||
Reference in New Issue
Block a user