Remove hardcoded config file in error message
Previously, it throw error message when database connection was not defined, "ValueError: Database connection not set in /etc/magnum/magnum.conf" even if it was explicitly run with "--config-file /other/location". So remove that hardcoded config file location. Change-Id: I3af00f1f6572c3cd9e56141e1774acf373bbce8b Closes-Bug: #1487258
This commit is contained in:
parent
860d3e3fac
commit
fb168ffb47
|
@ -20,6 +20,8 @@ from oslo_db import options
|
|||
from oslo_db.sqlalchemy.migration_cli import manager
|
||||
from oslo_log import log as logging
|
||||
|
||||
from magnum.i18n import _
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
|
@ -63,7 +65,7 @@ def add_command_parsers(subparsers):
|
|||
def get_manager():
|
||||
if cfg.CONF.database.connection is None:
|
||||
raise ValueError(
|
||||
'Database connection not set in /etc/magnum/magnum.conf')
|
||||
_('Could not find parameter database.connection in config file'))
|
||||
|
||||
alembic_path = os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__),
|
||||
|
|
Loading…
Reference in New Issue