📂 FileMgr
📍
/
usr
/
lib
/
python3
/
dist-packages
/
cloudinit
/
sources
/
helpers
/
__pycache__
✏️ /usr/lib/python3/dist-packages/cloudinit/sources/helpers/__pycache__/hetzner.cpython-312.pyc
✕ Tutup
� ��i� � � � d dl mZmZ d dlmZmZ dej defd�Z d deee e f fd�Zde dee fd�Zy )� )�Optional�Tuple)�net� url_helper�cause�returnc � � | j dk7 S )N�� )�code)r s �C/usr/lib/python3/dist-packages/cloudinit/sources/helpers/hetzner.py�_skip_retry_on_empty_responser s � ��:�:���� c �� � t j | |||t �� \ }}|st d| z � �||fS # t j $ r(}|j dk( r|j dfcY d }~S � d }~ww xY w)N)�urls�max_wait�timeout� sleep_time�exception_cbz!No data received from urls: '%s':r r )r �wait_for_urlr �RuntimeError�UrlErrorr �url)r r r r r �contents�es r �get_metadatar s~ � ��"�/�/����!� 7� � ��X� ��B�T�I�J�J��H�}������ ��6�6�S�=��5�5�#�:�� ���s! �47 �A2� A-�&A2�,A-�-A2�macc �h � t j � }|j | j � � S )N)r �get_interfaces_by_mac�get�lower)r �mac_to_ifaces r �get_interface_name_from_macr"