finish global_explorer_directory()

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-08 02:16:13 +02:00
parent c2873a8fa0
commit 11750515e1

View file

@ -60,8 +60,13 @@ def base_directory():
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir)) os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
return os.getcwd() return os.getcwd()
def conf_directory():
"""Returns path to main configuration directory"""
return os.path.join(base_directory(), "conf")
def global_explorer_directory(): def global_explorer_directory():
"""Returns path to directory containing the global explorers""" """Returns path to directory containing the global explorers"""
return os.path.join(conf_directory(), "explorer")
def list_global_explorers(): def list_global_explorers():
"""Return list of available explorers""" """Return list of available explorers"""
@ -90,5 +95,5 @@ if __name__ == "__main__":
hostname=sys.argv[1] hostname=sys.argv[1]
logger("info", "cdist", __cdist_version, ": Configuring host", hostname) logger("info", "cdist", __cdist_version, ": Configuring host", hostname)
cdist_deploy_to(hostname) cdist_deploy_to(hostname)
print(base_directory()) print(global_explorer_directory())