moksha/lib/helpers.py | 4 +++- moksha/middleware/middleware.py | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit 37d7a987c1a057bce4ef5d23026039f0eb85d00a Author: John (J5) Palmieri johnp@redhat.com Date: Tue Jun 2 18:04:05 2009 -0400
fix getting config files to work without a moksha config being present
diff --git a/moksha/lib/helpers.py b/moksha/lib/helpers.py index 1055739..09923be 100644 --- a/moksha/lib/helpers.py +++ b/moksha/lib/helpers.py @@ -784,7 +784,9 @@ def get_moksha_config_path(): if os.path.isfile(cfg): return cfg
- log.warn('No moksha configuratin file found, make sure the controlling app is fully configured') + log.warn('No moksha configuration file found, make sure the controlling app is fully configured') + + return None # raise MokshaConfigNotFound('Cannot find moksha configuration file!')
diff --git a/moksha/middleware/middleware.py b/moksha/middleware/middleware.py index d11b23a..03a1d1c 100644 --- a/moksha/middleware/middleware.py +++ b/moksha/middleware/middleware.py @@ -280,11 +280,16 @@ class MokshaMiddleware(object): where it is being run as WSGI middleware in a different environment.
""" - moksha_config_path = os.path.dirname(get_moksha_config_path()) + moksha_config_path = get_moksha_config_path() + apps = [] + if moksha_config_path: + moksha_config_path = os.path.dirname(moksha_config_path) + apps = [{'path': moksha_config_path}] main_app_config_path = os.path.dirname(get_main_app_config_path()) loaded_configs = []
- for app in [{'path': moksha_config_path}] + moksha.apps.values(): + apps += moksha.apps.values() + for app in apps: for configfile in ('production.ini', 'development.ini'): confpath = os.path.join(app['path'], configfile) if os.path.exists(confpath):
moksha-commits@lists.fedorahosted.org