From: Andrew Gaffney Date: Sat, 12 Sep 2009 05:20:00 +0000 (-0500) Subject: Remove another unnecessary intermediary variable X-Git-Tag: CATALYST-2.0.10~3^2~115 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a3907ead5a150d4d4fd13bc3194249905249561;p=catalyst.git Remove another unnecessary intermediary variable --- diff --git a/ChangeLog b/ChangeLog index bc5acbc0..56bf9b0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ # Distributed under the GPL v2 # $Id$ + 12 Sep 2009; Andrew Gaffney catalyst: + Remove another unnecessary intermediary variable + 12 Sep 2009; Andrew Gaffney modules/catalyst/config.py: Add ability to specify default values for all specs and add diff --git a/catalyst b/catalyst index af795411..088e334c 100755 --- a/catalyst +++ b/catalyst @@ -58,7 +58,6 @@ def show_version(): def parse_config(): # search a couple of different areas for the main config file myconf = {} - config_file = "" confdefaults = { "storedir": "/var/tmp/catalyst", @@ -74,14 +73,13 @@ def parse_config(): 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: @@ -94,7 +92,7 @@ def parse_config(): # 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: