def _AddressPortTupleFromProto(self, family, ap_proto): """Converts an AddressPort proto into a python (addrstr, port) tuple.""" try: addr = _remote_socket_addr.inet_ntop( self._TRANSLATED_AF_MAP[family], ap_proto.packed_address()) except ValueError: raise apiproxy_errors.ApplicationError( RemoteSocketServiceError.INVALID_REQUEST, 'Invalid Address.') return (addr, ap_proto.port())
def _AddressPortTupleFromProto(self, family, ap_proto): """Converts an AddressPort proto into a python (addrstr, port) tuple.""" try: addr = _remote_socket_addr.inet_ntop( self._TRANSLATED_AF_MAP[family], ap_proto.packed_address()) except ValueError: raise apiproxy_errors.ApplicationError( RemoteSocketServiceError.INVALID_REQUEST, 'Invalid Address.') return (addr, ap_proto.port())