Remove another unnecessary intermediary variable
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 12 Sep 2009 05:20:00 +0000 (00:20 -0500)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 12 Sep 2009 05:20:00 +0000 (00:20 -0500)
ChangeLog
catalyst

index bc5acbc0320b8205a1d474b73756ab3d694bdd72..56bf9b0db21abad8987916ad8c4750c2fd935f33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 # 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
index af79541149570d11bb7f82fed7c1785e804bb405..088e334ca7860cb50117c11bd81cd926840f15a0 100755 (executable)
--- 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: