From 20082bb5b3c1e098df31bec64148e2834489967b Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 28 Nov 2009 17:47:59 -0600 Subject: [PATCH] add get_target_name() --- modules/catalyst/target/generic.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/catalyst/target/generic.py b/modules/catalyst/target/generic.py index 35908f3e..e0270a52 100644 --- a/modules/catalyst/target/generic.py +++ b/modules/catalyst/target/generic.py @@ -15,7 +15,7 @@ class generic_target(catalyst.target.target): # self.settings=myspec # else: self.config = catalyst.config.config() - self.settings = self.config.get_spec().get_values() + self.settings = self.config.get_spec().get_values(self.get_target_name()) self.settings.update(self.config.get_conf()) self.required_values = [] @@ -28,7 +28,11 @@ class generic_target(catalyst.target.target): self._rel_type = self.settings["rel_type"] self._version_stamp = self.settings["version_stamp"] self._media = self.settings["build"] - self._target = self.settings["target"] + self._target = self.get_target_name() + + def get_target_name(self): + class_name = self.__class__.__name__ + return class_name.rsplit('_', 1)[0] def set_autoresume_path(self): self.settings["autoresume_path"] = catalyst.util.normpath(self.settings["storedir"] + \ -- 2.26.2