Skip to content
Snippets Groups Projects
Commit 7913589d authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

add: re-enable execution debug message

parent b03c7b74
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
import os, sys, subprocess
from socket import gethostname, gethostbyname
from threading import Lock
from logging import debug
def enum(*sequential, **named):
'''
......@@ -188,16 +190,16 @@ class Exec(object):
else:
stdout = open(os.devnull, 'w')
stderr = stdout
##print 'DBG>>>', ' '.join(cmd)
debug('Exec.call: cmd=`%s`', ' '.join(cmd))
if input is not None:
stdin = subprocess.PIPE
##print ' input=`%s`' % input
debug('Exec.call: input=`%s`', input)
else:
stdin = None
proc = subprocess.Popen(cmd, shell=shell, stdout=stdout, stderr=stderr,
stdin=stdin)
output = proc.communicate(input=input)
##print ' rc=`%d` out=`%s`' % (proc.returncode, output)
debug('Exec.call: rc=`%d` out=`%s`', proc.returncode, output)
return (proc.returncode, output)
@staticmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment