fixup list bug by creating a new one

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-09 15:00:09 +02:00
parent 2c15069d96
commit 6d5a53b7ad

View file

@ -155,7 +155,6 @@ class Cdist:
args[0][:0] = [ "/bin/sh", "-e" ] args[0][:0] = [ "/bin/sh", "-e" ]
if "remote" in kargs: if "remote" in kargs:
log.debug("Remote found")
if kargs["remote"]: if kargs["remote"]:
args[0][:0] = self.remote_prefix args[0][:0] = self.remote_prefix
remote = true remote = true
@ -178,7 +177,6 @@ class Cdist:
def run_or_fail(self, *args, **kargs): def run_or_fail(self, *args, **kargs):
if "remote" in kargs: if "remote" in kargs:
log.debug("Remote found")
if kargs["remote"]: if kargs["remote"]:
args[0][:0] = self.remote_prefix args[0][:0] = self.remote_prefix
@ -344,13 +342,10 @@ class Cdist:
explorers = self.list_type_explorers(type) explorers = self.list_type_explorers(type)
for explorer in explorers: for explorer in explorers:
remote_cmd = cmd + os.path.join(self.remote_type_explorer_dir(type), explorer) remote_cmd = cmd + [os.path.join(self.remote_type_explorer_dir(type), explorer)]
output = os.path.join(self.type_explorer_output_dir(cdist_object), explorer) output = os.path.join(self.type_explorer_output_dir(cdist_object), explorer)
output_fd = open(output, mode='w') output_fd = open(output, mode='w')
self.run_or_fail(remote_cmd, stdout=output_fd, remote=True) self.run_or_fail(remote_cmd, stdout=output_fd, remote=True)
output_fd.close() output_fd.close()
def init_deploy(self): def init_deploy(self):