introduce type_dir() and use it :-)

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-11 21:41:56 +02:00
parent 47c5ebcf3f
commit 326f2644c7

View file

@ -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)