@classmethod
    def __get_pp_ip(cls, addr_family, ip_string, which):
        try:
            packed = socket.inet_pton(addr_family, ip_string.decode('ascii'))
            return socket.inet_ntop(addr_family, packed)
        except (__HOLE__, socket.error):
            msg = 'Invalid proxy protocol {0} IP format'.format(which)
            raise AssertionError(msg)
dataset/ETHPy150Open slimta/python-slimta/slimta/util/proxyproto.py/ProxyProtocolV1.__get_pp_ip