From ea70bafa0cf5b4b68a09ea62aeabb24b9ef62878 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Mon, 28 Aug 2017 15:17:47 -0400 Subject: [PATCH] Fix mule starting under uWSGI with --ini-paste --- lib/galaxy/web/stack/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/web/stack/__init__.py b/lib/galaxy/web/stack/__init__.py index 7ce4f2bf91f..68cad351acc 100644 --- a/lib/galaxy/web/stack/__init__.py +++ b/lib/galaxy/web/stack/__init__.py @@ -189,8 +189,10 @@ class UWSGIApplicationStack(MessageApplicationStack): config_file = uwsgi_opt.get("galaxy_config_file") # otherwise, check --ini-paste if config_file is None and uwsgi_opt.get("ini-paste"): - config_file = uwsgi_opt.get("ini") or uwsgi_opt.get("ini-paste") - kwds['config_section'] = app_section + config_file = uwsgi_opt["ini-paste"] + parser = nice_config_parser(config_file) + if not parser.has_section(config_section) and parser.has_section('app:main'): + kwds['config_section'] = 'app:main' if config_file is None: return None kwds['config_file'] = config_file