%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/paste/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyo

�
a�Nc@sdZddlmZmZdddgZdefd��YZe�Ze�Zdefd��YZ	d�Z
e	jZd	S(
s*Paste Configuration Middleware and Objectsi����(tRegistryManagertStackedObjectProxytDispatchingConfigtCONFIGtConfigMiddlewarecBs`eZdZdd�Zd�Zd	d�Zd�Zd	d�Zd�Z	d�Z
e
ZZRS(
s
    This is a configuration object that can be used globally,
    imported, have references held onto.  The configuration may differ
    by thread (or may not).

    Specific configurations are registered (and deregistered) either
    for the process or for threads.
    RcCs*tt|�jd|�g|jd<dS(Ntnamet_process_configs(tsuperRt__init__t__dict__(tselfR((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyRscCs|j|�dS(s�
        Make ``conf`` the active configuration for this thread.
        Thread-local configuration always overrides process-wide
        configuration.

        This should be used like::

            conf = make_conf()
            dispatching_config.push_thread_config(conf)
            try:
                ... do stuff ...
            finally:
                dispatching_config.pop_thread_config(conf)
        N(t_push_object(R
tconf((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pytpush_thread_configscCs|j|�dS(s�
        Remove a thread-local configuration.  If ``conf`` is given,
        it is checked against the popped configuration and an error
        is emitted if they don't match.
        N(t_pop_object(R
R((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pytpop_thread_config+scCs|jj|�dS(sg
        Like push_thread_config, but applies the configuration to
        the entire process.
        N(Rtappend(R
R((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pytpush_process_config3scCs|j|j|�dS(N(t	_pop_fromR(R
R((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pytpop_process_config:scCsA|j�}|dk	r=||k	r=td||f��ndS(NsBThe config popped (%s) is not the same as the config expected (%s)(tpoptNonetAssertionError(R
tlstRtpopped((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyR=s
cCsOytt|�j�SWn1tk
rJ|jr;|jdStd��nXdS(Ni����s?No configuration has been registered for this process or thread(RRt_current_objt	TypeErrorRtAttributeError(R
((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyREs
	N(
t__name__t
__module__t__doc__RR
RRRRRRtcurrenttcurrent_conf(((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyR	s					cBseZdZedd�ZRS(s
    A WSGI middleware that adds a ``paste.config`` key (by default)
    to the request environment, as well as registering the
    configuration temporarily (for the length of the request) with
    ``paste.config.CONFIG`` (or any other ``DispatchingConfig``
    object).
    spaste.configcs5����fd�}t|j|�j|�dS(sv
        This delegates all requests to `application`, adding a *copy*
        of the configuration `config`.
        cs~|j�t�}�j�}|�<|dj�|�z�||�}Wd|tkro|j�d�n
||�<X|S(Nspaste.registry(tgett	no_configtcopytregisterRR(tenvirontstart_responset
popped_configtcurrent_configtapp_iter(tapplicationtconfigtdispatching_configtenviron_key(s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pytregister_configbs
N(Rt	__class__R(R
R*R+R,R-R.((R*R+R,R-s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyR\s(RRRRR(((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyRSscKs&|j�}|j|�t||�S(N(R#tupdateR(tapptglobal_conft
local_confR((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pytmake_config_filterss
N(Rtpaste.registryRRt__all__RRtobjectR"RR4tmake_config_middleware(((s=/opt/alt/python27/lib/python2.7/site-packages/paste/config.pyt<module>sG		 	

Zerion Mini Shell 1.0