KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/22697/root/usr/lib64/python2.4/site-packages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/22697/root/usr/lib64/python2.4/site-packages/CacheBlackBox.pyo
mò
äûEc@s\dkZdkZdkZdkZdkZd„Zd„Zdeifd„ƒYZdS(NcCs‡g}tidti|ƒƒ}xTti|ƒD]C}|i
|ƒ}|o'|iti
|idƒdƒƒq2q2W|iƒ|S(s¤
	Utility function.
	We build a list of the versions available of a given template file in
	a cache directory. the files will resemble /cache_dir/version.template
	s
(\d+)\.cache.iN(tversion_listtretcompiletescapettemplatetcache_matchtostlistdirt	cache_dirtfiletmatchtappendtstringtatoitgroupstsort(RRRR	RR
((t3/usr/lib64/python2.4/site-packages/CacheBlackBox.pytVersionLists+
cCs
t|ƒS(sÜ
	getBox: get a BlackBox from this module
	@box_cfg: a box_cfg conformant AdmList element containing
	the following elements:
	path: type string, the path to the context file (required)
	
	returns: CacheBlackBox object
	N(t
CacheBlackBoxtbox_cfg(R((RtgetBoxsRcBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s[
	The CacheBlackBox class provides a class to read and write Contexts
	from and to files.
	cCsd|_|ii|_d|_d|_d|_t	i
|ƒy|idƒi
ƒ|_Wntd‚nXy|idƒi
ƒ|_Wntd‚nXy|idƒi
ƒ|_Wntd‚nXy|id	ƒi
ƒ|_Wntd
‚nXdS(sÛ
		__init__: Initialize a BlackBox
		@self: the class instance
		@box_cfg: a box_cfg conformant AdmList element containing
		the following elements:
			cache_dir : a string
			template : a string
			mode : an integer
		iiRs6CacheBlackBox box_cfg must contain a 'cache_dir' entryRs5CacheBlackBox box_cfg must contain a 'template' entrytmodes1CacheBlackBox box_cfg must contain a 'mode' entrytdepths2CacheBlackBox box_cfg must contain a 'dapth' entryN(tselftstatust	__class__t
__module__tmet_errNotNonet_errStrtwritablet	AlchemisttvalidateBoxCfgRtgetChildByNametgetValueRt
ValueErrorRRR(RR((Rt__init__(s.					



cCs4t|i|iƒ}t|ƒdjodSndS(sa
		isReadable: if a read were attempted now, would it succede?
		@self: this BlackBox instance
		iiN(RRRRtvlisttlen(RR&((Rt
isReadableOs
cCsEy3|idt|ƒd|i}ti|ƒSWndSnXdS(sS
		readVersion: reads a specific version from the cache directiry, if it exists.
		t/s.cache.N(	RRtreprtversionRtpathR tReadContextFromFileR(RR+R,((RtreadVersionYs"cCsAt|i|iƒ}t|ƒdjodSn|i|dƒS(sX
		read: read the contents of the CacheBlackBox
		@self: this CacheBlackBox instance

		iiÿÿÿÿN(RRRRR&R'RR.(RR&((Rtreades
cCs8t|i|iƒ}t|ƒdjo|dSndS(s„
                version: returns the version of this CacheBlackBox's context
                @self: this CacheBlackBox instance

		iiÿÿÿÿN(RRRRR&R'R(RR&((RR+rs
cCs$|iƒiƒ}|idt|ƒd|i}y}t	i
||d|iƒt|i|iƒ}t|ƒ|ijo1ti|idt|dƒd|iƒndSWnltj
o`}t|iƒdjod|_|id|_n!|id|_|id|_dSnXdS(s
		write: write the contents of the CacheBlackBox
		@self: this CacheBlackBox instance

		This function is callable multiple times. It writes a
		Context out to the file the CacheBlackBox is initialized with.
		It returns 0 on failure, and a non-zero, positive integer
		on success.
		R)s.cache.Rit.iN(tcontexttgetIdentityRoott	getSerialtserialRRR*RR,R tWriteContextToFileRRR&R'RRtunlinkt	ExceptiontetargsRR(RR1R8R,R4R&((Rtwrite~s 	"1	(	t__name__Rt__doc__R%R(R.R/R+R:(((RR#s	'	
		
	(	R RRt
exceptionsRRRtBlackBoxR(RRR RRR=RR((Rt?s							

Anon7 - 2021