From dd10f9ad1bda6dbbf5b683994bd859f7d6ecda79 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sun, 11 Jan 2009 00:33:16 -0600 Subject: [PATCH] kill trailing whitespace --- catalyst | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/catalyst b/catalyst index ce7c3e28..18e72862 100755 --- a/catalyst +++ b/catalyst @@ -62,7 +62,7 @@ def parse_config(myconfig): "portdir":"/usr/portage","options":"",\ "snapshot_cache":"/var/tmp/catalyst/snapshot_cache",\ "hash_function":"crc32"} - + # first, try the one passed (presumably from the cmdline) if myconfig: if os.path.exists(myconfig): @@ -73,12 +73,12 @@ def parse_config(myconfig): print "!!! catalyst: Could not use specified configuration file "+\ myconfig sys.exit(1) - + # next, try the default location elif os.path.exists("/etc/catalyst/catalyst.conf"): print "Using default Catalyst configuration file, /etc/catalyst/catalyst.conf" config_file="/etc/catalyst/catalyst.conf" - + # can't find a config file (we are screwed), so bail out else: print "!!! catalyst: Could not find a suitable configuration file" @@ -89,11 +89,11 @@ def parse_config(myconfig): # execfile(config_file, myconf, myconf) myconfig = catalyst.config.ConfigParser(config_file) myconf.update(myconfig.get_values()) - + except: print "!!! catalyst: Unable to parse configuration file, "+myconfig sys.exit(1) - + # now, load up the values into conf_values so that we can use them for x in confdefaults.keys(): if x in myconf: @@ -171,9 +171,9 @@ def build_target(addlargs, targetmap): try: if not addlargs["target"] in targetmap: raise CatalystError,"Target \""+addlargs["target"]+"\" not available." - + mytarget=targetmap[addlargs["target"]](conf_values, addlargs) - + mytarget.run() except: @@ -223,7 +223,7 @@ def verify_digest_and_hash_functions(): if __name__ == "__main__": - + show_version() if os.getuid() != 0: @@ -235,11 +235,11 @@ if __name__ == "__main__": try: opts,args = getopt.getopt(sys.argv[1:], "apPhvdc:C:f:FVs:", ["purge", "purgeonly", "help", "version", "debug",\ "clear-autoresume", "config=", "cli=", "file=", "fetch", "verbose","snapshot="]) - + except getopt.GetoptError: usage() sys.exit(2) - + # defaults for commandline opts debug=False verbose=False @@ -260,7 +260,7 @@ if __name__ == "__main__": if o in ("-h", "--help"): usage() sys.exit(1) - + if o in ("-V", "--version"): print "Catalyst version "+__version__ sys.exit(1) @@ -278,14 +278,14 @@ if __name__ == "__main__": while x < len(sys.argv): mycmdline.append(sys.argv[x]) x=x+1 - + if o in ("-f", "--file"): run = True myspecfile=a if o in ("-F", "--fetchonly"): conf_values["FETCH"]="1" - + if o in ("-v", "--verbose"): conf_values["VERBOSE"]="1" @@ -298,7 +298,7 @@ if __name__ == "__main__": run = True mycmdline.append("target=snapshot") mycmdline.append("version_stamp="+a) - + if o in ("-p", "--purge"): conf_values["PURGE"] = "1" @@ -314,17 +314,17 @@ if __name__ == "__main__": sys.exit(2) parse_config(myconfig) - + verify_digest_and_hash_functions() targetmap = catalyst.target.build_target_map() addlargs={} - + if myspecfile: spec = catalyst.config.SpecParser(myspecfile) addlargs.update(spec.get_values()) - + if mycmdline: try: cmdline = catalyst.config.ConfigParser() @@ -340,7 +340,7 @@ if __name__ == "__main__": # everything is setup, so the build is a go try: build_target(addlargs, targetmap) - + except CatalystError: print print "Catalyst aborting...." -- 2.26.2