utils.py 文件源码

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

项目:python-libjuju 作者: juju 项目源码 文件源码
def _read_ssh_key():
    '''
    Inner function for read_ssh_key, suitable for passing to our
    Executor.

    '''
    default_data_dir = Path(Path.home(), ".local", "share", "juju")
    juju_data = os.environ.get("JUJU_DATA", default_data_dir)
    ssh_key_path = Path(juju_data, 'ssh', 'juju_id_rsa.pub')
    with ssh_key_path.open('r') as ssh_key_file:
        ssh_key = ssh_key_file.readlines()[0].strip()
    return ssh_key
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号