Current File : /opt/alt/python311/lib/python3.11/site-packages/pydig/__pycache__//resolver.cpython-311.pyc
�
��;f � �d � d dl Z d dlZd dlZddlmZ ej e� � Z G d� d� � ZdS )� N� )� QueryTypec �V � e Zd Z d d�Zed� � � Zed� � � Zd� Zd� Z dS )
�Resolver�digN�utf-8c �F � || _ |pg | _ |pg | _ || _ dS )zN
Stores some customisable options into this resolver instance
N)�
executable�nameservers�additional_args�encoding)�selfr
r r r
s �A/opt/alt/python311/lib/python3.11/site-packages/pydig/resolver.py�__init__zResolver.__init__ s0 � � %���&�,�"���.�4�"��� ��
�
�
� c �4 � t j | j � � S )zE
Returns a random nameserver we should query against
)�random�choicer )r s r �
nameserverzResolver.nameserver s � �
�}�T�-�.�.�.r c � � t � d� t | � � � � � � t j | � � S )zr
Calls out to subprocess with the passed in args
This method is normally mocked in tests
z%Executing subprocess.check_output({}))�logger�info�format�repr�
subprocess�check_output)�argss r �_executezResolver._execute"