Commit 4e6096c9 authored by Tristan Cavelier's avatar Tristan Cavelier

logging

parent 5659d72f
......@@ -34,6 +34,8 @@ from tempfile import mktemp
from os.path import basename
from base64 import b64decode
from cloudooo.manager import log
def keyNameToOption(key_name, prefix=""):
return "--" + prefix + key_name.replace("_", "-")
......@@ -69,14 +71,18 @@ class Handler(object):
output_path,
conversion_kw=kw,
)
stdout, stderr = Popen(
proc = Popen(
command,
stdout=PIPE,
stderr=PIPE,
close_fds=True,
env=self.environment,
cwd=self.file.directory_name,
).communicate()
)
stdout, stderr = proc.communicate()
returncode = proc.returncode
if returncode:
log("TRISTAN exit status %s\nstdout:\n%s\n\nstderr:\n%s\n\n" %(returncode, stdout, stderr))
self.file.reload(output_path)
try:
return self.file.getContent()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment