def runShell(cmd):
    try:
        (status, output) = commands.getstatusoutput(cmd)
    except Exception, e:
        return (1, "")
    # write shell and shell's result into shelllog

    return status, output

相关文章: