Merge pull request #513 from darko-poljak/fix-manifest-stdout

Fix manifest output
This commit is contained in:
Darko Poljak 2017-01-21 17:20:30 +01:00 committed by GitHub
commit 8bd2ea47cc
2 changed files with 7 additions and 5 deletions

View file

@ -138,7 +138,8 @@ class Manifest(object):
message_prefix = "initialmanifest"
self.local.run_script(initial_manifest,
env=self.env_initial_manifest(initial_manifest),
message_prefix=message_prefix)
message_prefix=message_prefix,
save_output=False)
def env_type_manifest(self, cdist_object):
type_manifest = os.path.join(self.local.type_path,
@ -163,4 +164,5 @@ class Manifest(object):
if os.path.isfile(type_manifest):
self.local.run_script(type_manifest,
env=self.env_type_manifest(cdist_object),
message_prefix=message_prefix)
message_prefix=message_prefix,
save_output=False)

View file

@ -212,7 +212,7 @@ class Local(object):
try:
if save_output:
output, errout = exec_util.call_get_output(command, env=env)
self.log.debug("Local stdout: {}".format(output))
self.log.info("Local stdout: {}".format(output))
# Currently, stderr is not captured.
# self.log.debug("Local stderr: {}".format(errout))
if return_output:
@ -231,7 +231,7 @@ class Local(object):
message.merge_messages()
def run_script(self, script, env=None, return_output=False,
message_prefix=None):
message_prefix=None, save_output=True):
"""Run the given script with the given environment.
Return the output as a string.
@ -240,7 +240,7 @@ class Local(object):
command.append(script)
return self.run(command=command, env=env, return_output=return_output,
message_prefix=message_prefix)
message_prefix=message_prefix, save_output=save_output)
def save_cache(self):
destination = os.path.join(self.cache_path, self.hostdir)