~openerp-dev/openobject-server/trunk-function-getter-assertion-cto

« back to all changes in this revision

Viewing changes to openerp/cli/server.py

[MERGE] [FORWARD] Forward-port of saas-1 branch until revision 4875

Revision ID: qdp-launchpad@openerp.com-20130507120149-p2m4ug20nfny234v

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        openerp.modules.registry.RegistryManager.new(dbname, update_module=update_module)
99
99
    except Exception:
100
100
        _logger.exception('Failed to initialize database `%s`.', dbname)
 
101
        return False
 
102
    return True
101
103
 
102
104
def run_test_file(dbname, test_file):
103
105
    """ Preload a registry, possibly run a test file, and start the cron."""
261
263
        else:
262
264
            openerp.service.start_services()
263
265
 
 
266
    rc = 0
264
267
    if config['db_name']:
265
268
        for dbname in config['db_name'].split(','):
266
 
            preload_registry(dbname)
 
269
            if not preload_registry(dbname):
 
270
                rc += 1
267
271
 
268
272
    if config["stop_after_init"]:
269
 
        sys.exit(0)
 
273
        sys.exit(rc)
270
274
 
271
275
    _logger.info('OpenERP server is running, waiting for connections...')
272
276
    quit_on_signals()