commit broken stuff

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-08 03:56:59 +02:00
parent 7a7413f1f4
commit 572401e4f8

View file

@ -22,8 +22,22 @@
import sys # argv import sys # argv
import subprocess # execute stuff import subprocess # execute stuff
import os import os
import tempfile
import shutil
__cdist_version="2.0.0"
class Cdist:
"""Cdist main class to hold arbitrary data"""
version="2.0.0"
def __init__(self):
self.tempdir = tempfile.mkdtemp()
print(self.tempdir)
def __del__(self):
print("Zerstoeren")
print(self.tempdir)
shutil.rmtree(self.tempdir)
def logger(type, *args): def logger(type, *args):
"""Ignore type for now, support later""" """Ignore type for now, support later"""
@ -76,7 +90,7 @@ def remote_conf_directory():
return os.path.join(remote_base_directory(), "conf") return os.path.join(remote_base_directory(), "conf")
def out_dir(): def out_dir():
FIXME: stopped - probably need static temp know! # FIXME: stopped - probably need static temp know!
"""Local directory containing output""" """Local directory containing output"""
return os.path.join(base_directory(), "conf") return os.path.join(base_directory(), "conf")
@ -134,7 +148,9 @@ def cdist_deploy_to(hostname):
if __name__ == "__main__": 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(list_global_explorers()) print(list_global_explorers())
c = Cdist()