introduce type_dir() and use it :-)

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/feature_files_export
Nico Schottelius 13 years ago
parent 47c5ebcf3f
commit 326f2644c7
  1. 8
      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)

Loading…
Cancel
Save