From 326f2644c7a9d7471a73b55403c97b620f28b570 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 11 Sep 2011 21:41:56 +0200 Subject: [PATCH] introduce type_dir() and use it :-) Signed-off-by: Nico Schottelius --- bin/cdist | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/cdist b/bin/cdist index a04575a8..5b2b8d88 100755 --- a/bin/cdist +++ b/bin/cdist @@ -302,9 +302,13 @@ class Cdist: return objects + def type_dir(self, type): + """Return directory the type""" + return os.path.join(TYPE_DIR, type) + def type_explorer_dir(self, type): """Return directory that holds the explorers of a type""" - return os.path.join(TYPE_DIR, type, "explorer") + return os.path.join(self.type_dir(type), "explorer") def type_gencode_paths(self, type): """Return paths to gencode scripts of type""" @@ -444,7 +448,7 @@ class Cdist: env = { "__object" : self.object_dir(cdist_object), "__object_id": self.get_object_id_from_object(cdist_object), "__object_fq": cdist_object, - "__type": type + "__type": self.type_dir(type) } self.run_manifest(manifest, extra_env=env)