Author: tmckay
Date: 2011-01-17 13:12:20 +0000 (Mon, 17 Jan 2011)
New Revision: 4468
Modified:
branches/multiples/cumin/bin/cumin-data
branches/multiples/cumin/bin/cumin-web
branches/multiples/cumin/python/cumin/config.py
Log:
Get rid of creation of hardcoded creation of "web" and "data"
sections.
Modified: branches/multiples/cumin/bin/cumin-data
===================================================================
--- branches/multiples/cumin/bin/cumin-data 2011-01-14 22:47:23 UTC (rev 4467)
+++ branches/multiples/cumin/bin/cumin-data 2011-01-17 13:12:20 UTC (rev 4468)
@@ -11,8 +11,6 @@
from mint import *
def main():
- config = CuminConfig()
-
# Configuration boot-strap issue. We need the value of
# the --section option first to set up defaults for further
# option parsing. This is complicated by the fact that
@@ -26,10 +24,8 @@
# Now that we have a section name, we have to dynamically create
# a CuminConfigSection associated with that name to guide the parse.
- if opts.section != "data":
- config.create_data_section(opts.section)
-
- # Now we can read our values from config files
+ config = CuminConfig()
+ config.create_data_section(opts.section)
values = config.parse()
# We need to have the requested section defined in the config files
Modified: branches/multiples/cumin/bin/cumin-web
===================================================================
--- branches/multiples/cumin/bin/cumin-web 2011-01-14 22:47:23 UTC (rev 4467)
+++ branches/multiples/cumin/bin/cumin-web 2011-01-17 13:12:20 UTC (rev 4468)
@@ -11,8 +11,6 @@
from cumin.util import *
def main():
- config = CuminConfig()
-
# Configuration boot-strap issue. We need the value of
# the --section option first to set up defaults for further
# option parsing. This is complicated by the fact that
@@ -26,10 +24,8 @@
# Now that we have a section name, we have to dynamically create
# a CuminConfigSection associated with that name to guide the parse.
- if opts.section != "web":
- config.create_web_section(opts.section)
-
- # Now we can read our values from config files
+ config = CuminConfig()
+ config.create_web_section(opts.section)
values = config.parse()
# We need to have the requested section defined in the config files
Modified: branches/multiples/cumin/python/cumin/config.py
===================================================================
--- branches/multiples/cumin/python/cumin/config.py 2011-01-14 22:47:23 UTC (rev 4467)
+++ branches/multiples/cumin/python/cumin/config.py 2011-01-17 13:12:20 UTC (rev 4468)
@@ -17,10 +17,6 @@
if not os.path.isdir(self.home):
raise Exception("Home path '%s' is not a directory")
- self.create_web_section("web")
-
- self.create_data_section("data")
-
def create_web_section(self, name):
web = CuminConfigSection(self, name)
Show replies by date