From 4a3907ead5a150d4d4fd13bc3194249905249561 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 12 Sep 2009 00:20:00 -0500 Subject: [PATCH] Remove another unnecessary intermediary variable --- ChangeLog | 3 +++ catalyst | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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: -- 2.26.2