From 8cd23970fbb1f6250a65f570c288579777464cbf Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 6 Dec 2017 19:54:54 -0500 Subject: [PATCH] Fix for None config_file in web stack stuff. --- lib/galaxy/web/stack/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/web/stack/__init__.py b/lib/galaxy/web/stack/__init__.py index 458e768dbf5..6d92d45741d 100644 --- a/lib/galaxy/web/stack/__init__.py +++ b/lib/galaxy/web/stack/__init__.py @@ -194,8 +194,9 @@ class UWSGIApplicationStack(MessageApplicationStack): # application was loaded with --ini-paste, so we can make some assumptions, most notably, uWSGI does not have # any way to set the app name when loading with paste.deploy:loadapp(), so hardcoding the alternate section # name to `app:main` is fine. - if ((config_file is None and uwsgi_opt.get("ini") or uwsgi_opt.get("ini-paste")) - or has_ext(config_file, "ini", aliases=True, ignore="sample")): + has_ini_config = config_file is None and uwsgi_opt.get("ini") or uwsgi_opt.get("ini-paste") + has_ini_config = has_ini_config or (config_file and has_ext(config_file, "ini", aliases=True, ignore="sample")) + if has_ini_config: config_file = config_file or uwsgi_opt.get("ini") or uwsgi_opt.get("ini-paste") parser = nice_config_parser(config_file) if not parser.has_section(config_section) and parser.has_section('app:main'):