parser.py 文件源码

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

项目:concierge 作者: 9seconds 项目源码 文件源码
def fix_star_host(root):
    star_host = None

    for host in root.childs:
        if host.name == "*":
            LOG.debug("Detected known '*' host.")
            star_host = host
            break
    else:
        LOG.debug("Add new '*' host.")
        star_host = root.add_host("*")

    values = collections.defaultdict(set)
    values.update(root.values)
    values.update(star_host.values)
    star_host.values = values
    star_host.trackable = True
    root.values.clear()

    return root
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号