cli.py 文件源码

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

项目:gluster-georep-tools 作者: aravindavk 项目源码 文件源码
def get_glusterd_workdir():
    """
    Command to get Glusterd working dir. If failed returns the
    default directory /var/lib/glusterd
    """
    p = subprocess.Popen(["gluster", "system::", "getwd"],
                         stdout=subprocess.PIPE)

    out, _ = p.communicate()

    if p.returncode == 0:
        return out.strip()
    else:
        return DEFAULT_GLUSTERD_WORKDIR
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号