Skip to content
Snippets Groups Projects
Commit 33ce0e73 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] When running with --stop-after-init, return code must be not null if any failure happen.

bzr revid: chs@openerp.com-20131118132235-84u5hfccm784ge5l
parent 4921167d
No related branches found
No related tags found
No related merge requests found
......@@ -94,11 +94,11 @@ def preload_registry(dbname):
""" Preload a registry, and start the cron."""
try:
update_module = True if openerp.tools.config['init'] or openerp.tools.config['update'] else False
openerp.modules.registry.RegistryManager.new(dbname, update_module=update_module)
registry = openerp.modules.registry.RegistryManager.new(dbname, update_module=update_module)
except Exception:
_logger.exception('Failed to initialize database `%s`.', dbname)
return False
return True
return registry._assertion_report.failures == 0
def run_test_file(dbname, test_file):
""" Preload a registry, possibly run a test file, and start the cron."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment