1 2 3 4 5 6 7 8 9 10 11 12 13
def run(list,cfg): import subprocess retcode = subprocess.call(list) if retcode == 0: return if retcode < 0: str="Cmd terminated by signal %s\n" % -retcode else: str="Cmd returned %s\n" % retcode str+=' '.join(list) raise Exception(str)