From da92c80d31e6b3e2f51aa2d492ecf6dd5ed0a305 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sun, 13 Sep 2009 19:33:49 -0500 Subject: [PATCH] prune some dead code --- modules/catalyst/target/generic_stage.py | 10 ++++------ modules/catalyst/target/livecd_stage2.py | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/catalyst/target/generic_stage.py b/modules/catalyst/target/generic_stage.py index d5a1f37f..d9f6cd34 100644 --- a/modules/catalyst/target/generic_stage.py +++ b/modules/catalyst/target/generic_stage.py @@ -310,12 +310,10 @@ class generic_stage_target(generic_target): self.settings["source_path"]=catalyst.util.normpath(self.settings["storedir"]+\ "/builds/"+self.settings["source_subpath"]+".tar.bz2") if os.path.isfile(self.settings["source_path"]): - # XXX: Is this even necessary if the previous check passes? - if os.path.exists(self.settings["source_path"]): - self.settings["source_path_hash"]=\ - catalyst.hash.generate_hash(self.settings["source_path"],\ - hash_function=self.settings["hash_function"],\ - verbose=False) + self.settings["source_path_hash"]=\ + catalyst.hash.generate_hash(self.settings["source_path"],\ + hash_function=self.settings["hash_function"],\ + verbose=False) msg("Source path set to " + self.settings["source_path"]) if os.path.isdir(self.settings["source_path"]): msg("\tIf this is not desired, remove this directory or turn off") diff --git a/modules/catalyst/target/livecd_stage2.py b/modules/catalyst/target/livecd_stage2.py index 2530d3a1..00bf9393 100644 --- a/modules/catalyst/target/livecd_stage2.py +++ b/modules/catalyst/target/livecd_stage2.py @@ -116,9 +116,7 @@ class livecd_stage2_target(generic_stage_target): cmd(unpack_cmd,error_msg,env=self.env) if "source_path_hash" in self.settings: - myf=open(self.settings["autoresume_path"]+"unpack","w") - myf.write(self.settings["source_path_hash"]) - myf.close() + self.set_autoresume("unpack", self.settings["source_path_hash"]) else: self.set_autoresume("unpack") -- 2.26.2