From e53bad95d2cf88833d2f6e90d57115f6fda2cd50 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Wed, 17 Jun 2009 19:25:34 +0000 Subject: [PATCH] Add a hack to add a frontend section if not present This will allow the django test code to run on systems that aren't setup to run the web site. --- htsworkflow/frontend/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htsworkflow/frontend/settings.py b/htsworkflow/frontend/settings.py index d971bbc..42d091a 100644 --- a/htsworkflow/frontend/settings.py +++ b/htsworkflow/frontend/settings.py @@ -61,6 +61,12 @@ options = ConfigParser.SafeConfigParser( options.read([os.path.expanduser("~/.htsworkflow.ini"), '/etc/htsworkflow.ini',]) +# OptionParser will use the dictionary passed into the config parser as +# 'Default' values in any section. However it still needs an empty section +# to exist in order to retrieve anything. +if not options.has_section('frontend'): + options.add_section('frontend') + # Django settings for elandifier project. DEBUG = True -- 2.30.2