Log stderr when creating and destroying envs

Not having this makes debugging problems extremely difficult.

Change-Id: I79e388828e9b746ee6ccbe8b53b24dfa718fe040
This commit is contained in:
Derek Higgins 2016-07-05 17:27:15 +01:00
parent 5016e37392
commit a9456c14ce
1 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ class TEWorkerThread(threading.Thread):
with tempfile.NamedTemporaryFile('r') as fp:
os.environ["TE_DATAFILE"] = fp.name
logger.info(
subprocess.check_output([self.scriptfiles[0], self.num, arguments.get("envsize","2"), arguments.get("ucinstance","")]))
subprocess.check_output([self.scriptfiles[0], self.num, arguments.get("envsize","2"), arguments.get("ucinstance","")], stderr=subprocess.STDOUT))
clientdata = fp.read()
except subprocess.CalledProcessError as e:
logger.error(e.output)
@ -148,7 +148,7 @@ class TEWorkerThread(threading.Thread):
if not cb_job.running:
logger.error("No sign of the Callback job starting,"
"assuming its no longer present")
clientdata = subprocess.check_output([self.scriptfiles[1], self.num])
clientdata = subprocess.check_output([self.scriptfiles[1], self.num], stderr=subprocess.STDOUT)
logger.info(clientdata)
client.shutdown()
return
@ -166,7 +166,7 @@ class TEWorkerThread(threading.Thread):
else:
logger.info('Returned from Job : %s', cb_job.data)
try:
clientdata = subprocess.check_output([self.scriptfiles[1], self.num])
clientdata = subprocess.check_output([self.scriptfiles[1], self.num], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
logger.error(e.output)
raise