diff --git a/mylar/__init__.py b/mylar/__init__.py index 5b4c301c..896b3635 100644 --- a/mylar/__init__.py +++ b/mylar/__init__.py @@ -191,6 +191,13 @@ def initialize(config_file): else: vers = 'NONE' + # Initialize the database + logger.info('Checking to see if the database has all tables....') + try: + dbcheck() + except Exception, e: + logger.error('Cannot connect to the database: %s' % e) + if MAINTENANCE is False: #try to get the local IP using socket. Get this on every startup so it's at least current for existing session. import socket @@ -218,13 +225,6 @@ def initialize(config_file): logger.info('Config GIT Branch: %s' % CONFIG.GIT_BRANCH) - # Initialize the database - logger.info('Checking to see if the database has all tables....') - try: - dbcheck() - except Exception, e: - logger.error('Cannot connect to the database: %s' % e) - # Check for new versions (autoupdate) if CONFIG.CHECK_GITHUB_ON_STARTUP: try: