Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion marco/marco/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
# Configuration file
# ---------------------------------------------------------------------------
MP_PROJECT_CONFIG = os.environ.get("MP_PROJECT_CONFIG", "config.ini")
CONFIG_FILE = os.path.normpath(os.path.join(BASE_DIR, MP_PROJECT_CONFIG))

# Allow MP_PROJECT_CONFIG to be an absolute path. Enabling modularity,
# because a config.ini can live outside the madrona portal project directory.
# Otherwise use the config.ini in madrona portal.
if os.path.isabs(MP_PROJECT_CONFIG):
CONFIG_FILE = MP_PROJECT_CONFIG
else:
CONFIG_FILE = os.path.normpath(os.path.join(BASE_DIR, MP_PROJECT_CONFIG))
Comment on lines +42 to +45

cfg = configparser.ConfigParser()
cfg.read(CONFIG_FILE)
Expand Down