This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandaye/mandaye/__init__.py

20 lines
421 B
Python

VERSION=0.4
import os
from mandaye import global_config
from mandaye.exceptions import ImproperlyConfigured
ENVIRONMENT_VARIABLE = "MANDAYE_CONFIG_MODULE"
config = None
if os.environ.has_key(ENVIRONMENT_VARIABLE):
try:
mod = import_module(path)
except ImportError, e:
raise ImproperlyConfigured('Error importing config %s: "%s"' % (path, e))
config = mod
else:
config = global_config