cli.py 文件源码

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

项目:Zappa 作者: Miserlou 项目源码 文件源码
def is_http_log_entry(self, string):
        """
        Determines if a log entry is an HTTP-formatted log string or not.
        """
        # Debug event filter
        if 'Zappa Event' in string:
            return False

        # IP address filter
        for token in string.replace('\t', ' ').split(' '):
            try:
                if (token.count('.') is 3 and token.replace('.', '').isnumeric()):
                    return True
            except Exception: # pragma: no cover
                pass

        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号