ctrlapi.py 文件源码

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

项目:tool 作者: PathDump 项目源码 文件源码
def send_source (hosts, tree, filename):
    if source_available_at (hosts):
        return True

    # need to send a copy of source to hosts which don't have it
    send_tree = remove_hosts_from_tree (hosts, tree)

    req = {'api': 'send_source'}
    req.update ({'tree': send_tree})
    req.update ({'name': filename})

    resp, content = r.post (controller, json.dumps (req, default=json_util.default), "pathdump")
    return source_available_at (json.loads (content, object_hook=json_util.object_hook))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号