database.py 文件源码

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

项目:Cortex-Analyzers 作者: CERT-BDF 项目源码 文件源码
def _get(self, database_type, ip_address):
        if not database_type in self.metadata().database_type:
            caller = inspect.stack()[2][3]
            raise TypeError("The %s method cannot be used with the "
                            "%s database" %
                            (caller, self.metadata().database_type))
        record = self._db_reader.get(ip_address)
        if record is None:
            raise geoip2.errors.AddressNotFoundError(
                "The address %s is not in the database." % ip_address)
        return record
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号