
    th                         d dl mZmZ d dlmZmZ dej                  defdZ	 	 	 d
deee	   e
f   fdZde	dee	   fdZy	)    )OptionalTuple)net
url_helpercausereturnc                      | j                   dk7  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              \  }}|st        d| z        ||fS # t         j                  $ r(}|j
                  dk(  r|j                  dfcY d }~S  d }~ww xY 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 BTIJJH} 66S=55#: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"   )   s'    ,,.LCIIK((r   N)x      r$   )typingr   r   	cloudinitr   r   r   boolr   strbytesr   r"    r   r   <module>r+      se    # %)<)<   	
 8C=% 4)S )Xc] )r   