# Distributed under the GPL v2
# $Id$
+ 12 Sep 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
+ Remove another unnecessary intermediary variable
+
12 Sep 2009; Andrew Gaffney <agaffney@gentoo.org>
modules/catalyst/config.py:
Add ability to specify default values for all specs and add
def parse_config():
# search a couple of different areas for the main config file
myconf = {}
- config_file = ""
confdefaults = {
"storedir": "/var/tmp/catalyst",
if "config_file" in conf_values:
if os.path.exists(conf_values["config_file"]):
msg("Using command line specified Catalyst configuration file, " + conf_values["config_file"])
- config_file = conf_values["config_file"]
else:
die("specified configuration file " + conf_values["config_file"] + " does not exist")
# next, try the default location
elif os.path.exists("/etc/catalyst/catalyst.conf"):
msg("Using default Catalyst configuration file, /etc/catalyst/catalyst.conf")
- config_file = "/etc/catalyst/catalyst.conf"
+ conf_values["config_file"] = "/etc/catalyst/catalyst.conf"
# can't find a config file (we are screwed), so bail out
else:
# now, try and parse the config file "config_file"
try:
- myconfig = catalyst.config.ConfigParser(config_file)
+ myconfig = catalyst.config.ConfigParser(conf_values["config_file"])
myconf.update(myconfig.get_values())
except: