o
    &zh’  ã                   @   s"   d dl Z G dd„ deƒZeƒ ZdS )é    Nc                       s@   e Zd ZdZd‡ fdd„Zdd„ Zdd	„ Zdefd
d„Z‡  Z	S )Ú
HttpConfigzø
    Configuration settings for httplib.

    See: https://docs.python.org/3.4/library/http.client.html#http.client.HTTPSConnection

    available settings

    - http_key_file
    - http_cert_file
    - http_source_address
    - http_timeout

    ÚreturnNc                    s   t ƒ j|i |¤Ž d| d< d S )Né   Útimeout)ÚsuperÚ__init__)ÚselfÚargsÚkwargs©Ú	__class__© úV/var/www/html/kangema/venv/lib/python3.10/site-packages/xhtml2pdf/config/httpconfig.pyr   !   s   zHttpConfig.__init__c                 C   s$   |dkrt  ¡ | d< d S || |< d S )NÚ
nosslcheckÚcontext)ÚsslÚ_create_unverified_context©r   ÚnameÚvaluer   r   r   Ú	save_keys%   s   zHttpConfig.save_keysc                 C   sV   |  d¡r|dd … }n|  d¡r|dd … }d|v r)| dd¡}|  ||¡ dS dS )	Nz--é   ú-é   Úhttp_Ú TF)Ú
startswithÚreplacer   r   r   r   r   Úis_http_config+   s   

zHttpConfig.is_http_configc                 C   s.   d}|   ¡ D ]\}}||›d|›d7 }q|S )Nr   z = z, )Úitems)r   ÚdevÚkeyr   r   r   r   Ú__repr__7   s   zHttpConfig.__repr__)r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   Ústrr"   Ú__classcell__r   r   r   r   r      s    r   )r   Údictr   Ú
httpConfigr   r   r   r   Ú<module>   s   
,