Commit 7913589d authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

add: re-enable execution debug message

parent b03c7b74
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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