
    Tf                     N    d dl Z d dlZd dlmZ d dlmZ d dlmZ ddZd Z	d Z
dS )	    N)loadapp)WSGIApplication)get_default_config_filec                 \    d| vrd| z  } t          | |t          j                    |          S )N:z	config:%s)namerelative_toglobal_conf)r   osgetcwd)
config_urir   defaultss      H/var/www/html/env/lib/python3.11/site-packages/gunicorn/app/pasterapp.pyget_wsgi_appr      s@    
* :-
IKK	       c                 ~    t          j                    }|                    | g           |                    d          S )Nloggers)configparserConfigParserreadhas_section)config_fileparsers     r   has_logging_configr      s8    &((F
KKi(((r   c                 \    |d                              dd                               dd          }                     dd          }|r|r|d|d<   n|r|                    d	          d<    G  fd
dt                    } |                                             dS )z    A Paste Deployment server runner.

    Example configuration:

        [server:main]
        use = egg:gunicorn#main
        host = 127.0.0.1
        port = 5000
    __file__configNhost portr   bind,c                   (    e Zd ZfdZ fdZdS )&serve.<locals>.PasterServerApplicationc                    | j                             d           t                    r| j                             d           r|                                n%t	                      }||                     |                                           D ]4\  }}|-| j                             |                                |           5d S )Ndefault_proc_name	logconfig)cfgsetr   load_config_from_filer   itemslower)selfdefault_gunicorn_config_filekvr   gunicorn_config_file
local_confs       r   load_configz2serve.<locals>.PasterServerApplication.load_config7   s    HLL,k:::!+.. 7[+666# M**+?@@@@/F/H/H,/;../KLLL"((** / /1=HLLA.../ /r   c                     S )N )r-   apps    r   loadz+serve.<locals>.PasterServerApplication.loadH   s    Jr   N)__name__
__module____qualname__r3   r7   )r6   r   r1   r2   s   r   PasterServerApplicationr$   6   sQ        	/ 	/ 	/ 	/ 	/ 	/ 	/"	 	 	 	 	 	 	r   r;   )popsplitr   run)r6   r
   r2   r   r    r;   r   r1   s   ` `   @@r   server?   !   s     j)K%>>(D99>>&"%%D>>&"%%D - -(,dd3
6	 -!ZZ__
6         /   * !!#####r   )NN)r   r   paste.deployr   gunicorn.app.wsgiappr   gunicorn.configr   r   r   r?   r5   r   r   <module>rC      s        				             0 0 0 0 0 0 3 3 3 3 3 3	 	 	 	) ) )*$ *$ *$ *$ *$r   