fs.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:DeepSea 作者: SUSE 项目源码 文件源码
def _run(cmd):
    """
    NOTE: Taken from osd.py module.
    """
    log.info(cmd)
    proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True)
    proc.wait()
    _stdout = proc.stdout.read().rstrip()
    _stderr = proc.stdout.read().rstrip()
    log.debug("return code: {}".format(proc.returncode))
    log.debug(_stdout)
    log.debug(_stderr)
    log.debug(pprint.pformat(proc.stdout.read()))
    log.debug(pprint.pformat(proc.stderr.read()))
    # return proc.returncode, _stdout, _stderr
    return proc.returncode, _stdout, _stderr
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号