o
    ôSk[ˆ  ã                   @   s&   d Z ddlZG dd„ deƒZeƒ ZdS )z)
Created on 1 dic. 2017

@author: luisza
é    Nc                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	Ú
HttpConfigao  
    Configuration settings for httplib
    
    See 
    - python2 : https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection
    - python3 : 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
    
    c                 C   s$   |dkrt  ¡ | d< d S || |< d S )NÚ
nosslcheckÚcontext)ÚsslÚ_create_unverified_context©ÚselfÚnameÚvalue© r   úM/var/www/html/env/lib/python3.10/site-packages/xhtml2pdf/config/httpconfig.pyÚ	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||f 7 }q|S )Nr   z	%r = %r, )Úitems)r   ÚdevÚkeyr
   r   r   r   Ú__repr__-   s   zHttpConfig.__repr__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   
   s
    r   )r   r   Údictr   Ú
httpConfigr   r   r   r   Ú<module>   s    
*