File: //usr/lib/python3/dist-packages/twisted/names/__pycache__/secondary.cpython-38.pyc
U
W[� � @ s� d dl mZmZ ddgZd dlmZmZ d dlmZ d dlm Z d dlm
Z
d dlmZ d d lm
Z
d d
lmZmZ d dlmZ G dd� dej�ZG d
d� de
�ZdS )� )�absolute_import�division�SecondaryAuthority�SecondaryAuthorityService)�task�defer)�dns)�common)�client)�resolve)�
FileAuthority)�log�failure)�servicec @ s@ e Zd ZdZdZdd� Zedd� �Zdd� Zd d
� Z dd� Z
dS )
r N�5 c s � | _ � fdd�|D �| _dS )a
@param primary: The IP address of the server from which to perform
zone transfers.
@type primary: L{str}
@param domains: A sequence of domain names for which to perform
zone transfers.
@type domains: L{list} of L{bytes}
c s g | ]}t � |��qS � )r ��.0�d��primaryr �9/usr/lib/python3/dist-packages/twisted/names/secondary.py�
<listcomp># s z6SecondaryAuthorityService.__init__.<locals>.<listcomp>N)r �domains)�selfr r r r r �__init__ s
z"SecondaryAuthorityService.__init__c s6 | dg �}� d |_ � d |_� fdd�|D �|_|S )aS
Construct a new L{SecondaryAuthorityService} from a tuple giving a
server address and a C{str} giving the name of a domain for which this
is an authority.
@param serverAddress: A two-tuple, the first element of which is a
C{str} giving an IP address and the second element of which is a
C{int} giving a port number. Together, these define where zone
transfers will be attempted from.
@param domain: A C{bytes} giving the domain to transfer.
@return: A new instance of L{SecondaryAuthorityService}.
Nr � c s g | ]}t �� |��qS r )r �fromServerAddressAndDomainr ��
serverAddressr r r 9 s �zISecondaryAuthorityService.fromServerAddressAndDomains.<locals>.<listcomp>)r �_portr )�clsr r r r r r �fromServerAddressAndDomains&