ExpResCriteriaCommon.py 文件源码

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

项目:ripe-atlas-monitor 作者: pierky 项目源码 文件源码
def __str__(self):
        all_subnets = True
        for ip in self.dst_ip:
            all_subnets = all_subnets and ip.prefixlen() not in [32, 128]

        more_than_one = len(self.dst_ip) > 1

        if all_subnets:
            tpl = "Destination IP must fall into {}"
        else:
            if more_than_one:
                tpl = "Destination IP must be in {}"
            else:
                tpl = "Destination IP must be {}"

        return tpl.format(self._str_list())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号