X-Git-Url: https://code.grnet.gr/git/pithos/blobdiff_plain/44d80edf69c038bbcf042639025102f9c6da2e30..078acc477263397d8eae8a9b93c36399c0451efd:/snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/env.py diff --git a/snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/env.py b/snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/env.py index 61744d2..22e035e 100644 --- a/snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/env.py +++ b/snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/env.py @@ -2,7 +2,17 @@ from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig -from synnefo.settings import PITHOS_BACKEND_DB_CONNECTION + +try: + # pithos-app case + from synnefo.settings import PITHOS_BACKEND_DB_CONNECTION +except ImportError: + try: + # plankton case + from synnefo.settings import BACKEND_DB_CONNECTION as \ + PITHOS_BACKEND_DB_CONNECTION + except ImportError: + PITHOS_BACKEND_DB_CONNECTION = None # this is the Alembic Config object, which provides # access to the values within the .ini file in use.