MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/usr/lib/python2.4/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/lib/python2.4/site-packages/yum/parser.pyc
mς
ύΙODc@sΑdkZdkZdkZdkZdkZdkZdkZdklZl	Z	l
Z
defd„ƒYZdefd„ƒYZei
dƒZd„Zd„Zed	joeƒndS(
N(sConfigParsersNoSectionErrors
NoOptionErrortIncludingConfigParsercBsΛtZddd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„Zd„Zd„Z
d
„Zdd„Zd„Zd„Zd„Zedd„Zd„Zd„Zd„ZRS(NtincludecCs8||_h|_h|_d|_ti||ƒdS(s‹
        @param vars: A dictionary of subsitution variables.
        @param include: Name of option that lists files for inclusion
        N(	Rtselft_fnst	_includedtNonetcwdtConfigParsert__init__tvars(RR	R((t./usr/lib/python2.4/site-packages/yum/parser.pyRs				cCs|iS(s:Return a dictionary containing the instance-wide defaults.N(Rt	_defaults(R((R
tdefaults*scCs7|iƒ}x$|iiƒD]}|i|ƒqW|S(s=Return a list of the sections available in file and includes.N(Rt _IncludingConfigParser__sectionstsRtkeystincludedtappend(RRR((R
tsections.scCs9||iƒjp||iiƒjotSntSdS(sZIndicates whether the named section is present in 
        the configuration and includes.N(tsectionRR
RRtTruetFalse(RR((R
thas_section5s)cCsu|i|ƒpt|ƒ‚n||iiƒjo(|i|}|i|i||ƒSnt
i|||ƒSdS(N(RRRtNoSectionErrorRRtfnRt
has_optiontoptionR(RRRR((R
R=s
cCso|i|ƒpt|ƒ‚n||iiƒjo%|i|}|i|i|ƒSnt	i||ƒSdS(s8Return a list of option names for the given section nameN(
RRRRRRRRtoptionsR(RRR((R
RFs
cCso|i|ƒpt|ƒ‚n||iiƒjo%|i|}|i|i|ƒSnt	i||ƒSdS(N(
RRRRRRRRtitemsR(RRR((R
RPs
cCso|i|ƒpt|ƒ‚n||iiƒjo%|i|}|i|i|ƒSnt	i||ƒSdS(N(
RRRRRRRRtremove_sectionR(RRR((R
RYs
cCs“|i|ƒpt|ƒ‚n|i||iƒpt|i|ƒ‚n|i||iƒ}|t
i|ƒjodSn|i||ƒdS(s%Add a included file to config sectionN(
RRRRRRt
NoOptionErrortgettincRtshlextsplitt_add_include(RRRR ((R
tadd_includebscCsk|i|ƒpt|ƒ‚n|i||iƒpt|i|ƒ‚n|ii|ƒpdSndS(s Remove an included config parserN(
RRRRRRRRthas_keyR(RRR((R
tremove_includenscCs
ti|ƒS(N(RRR(R((R
t
__sectionsxscCsYxRti|ƒD]A}tiitii|ƒƒ|_	t
i||ƒ|iƒqWdS(N(
R!R"t	filenamestfilenametostpathtdirnametrealpathRRRtreadt
_readincludes(RR(R)((R
R.{s
!cCs!ti|||ƒ|iƒdS(N(RtreadfpRtfpR)R/(RR1R)((R
R0scCsθdG|G|GHt|iƒ}ti|dƒ\}
}}	}}}|
djo
|	}n|
djo6|i
ti	iƒpti	i|i|ƒ}qšn|iti|ƒ|ƒx!|iƒD]}||i|<qΐW||i|<dS(NR#tfile(RR)RRRtcturlparsetschemetlocR+tparamstqrytfragt
startswithR*tseptjoinRR0t
urlgrabberturlopenRtincludesectionRR(RRR)R9R6R3R?R7R8R+R5((R
R#…s
$


 
cCsx|i||iƒ}ti|ƒ}||jo|i	|ƒn|i
||iti|dƒƒ|i
i|ƒdS(Nt (RRRRR R!R"R(R)tremovetsettstringR<Rtpop(RRR)R(R ((R
t_remove_includeœs
"cCsqxjti|ƒD]Y}|i||iƒo=x:ti|i||iƒƒD]}|i
||ƒqKWqqWdS(N(RRRRRRR!R"RR)R#(RR)R((R
R/€scCsW||ijo.|i|}|i|i||||ƒSnt	i|||||ƒS(s*Return section from file or included filesN(
RRRRRRRtrawR	R(RRRRFR	R((R
Rͺs

!cCsQ||ijo+|i|}|i|i|||ƒSnti||||ƒS(N(	RRRRRRBRtvalueR(RRRRGR((R
RB±s
cCsϋx|iD]…}|id|ƒx^|i|iƒD]I\}}|djoq5n|id|t|ƒi	ddƒfƒq5W|idƒq
Wxa|i
iƒD]P}t
i
|dƒd}|djo't|dƒ}|i
|i|ƒq£q£Wd	S(
sTake a file object and write its[%s]
t__name__s%s = %s
s
s
	R2itwN(Rt	_sectionsRR1twriteRtkeyRGtstrtreplaceRRRR4R5topenR (RR1RGRLR5RRR ((R
RK·s 

-
cCs
t||ƒS(sΜPerform $var subsitution (this overides the default %(..)s subsitution)

        Only the rawval and vars arguments are used. The rest are present for
        compatibility with the parent class.
        N(t
varReplacetrawvalR	(RRRRQR	((R
t_interpolateΞs(RHt
__module__RRRRRRRRRR$R&R
R.R0R#RER/RRRBRKRR(((R
Rs(						
						
							tIncludedDirConfigParsercBs>tZdZeeddd„Zd„Zd„Zd„ZRS(sAA conf.d recursive parser - supporting one level of included dirss*.confRcCs/||_||_ti|d|d|ƒdS(NR	R(tincludeglobRt
includedirRRR	R(RR	RVRUR((R
RΪs		cCs8x1ti|ƒD] }ti||ƒ|iƒqWdS(N(R!R"R(R)RR.Rt_includedir(RR(R)((R
R.ίscCsƒx|ti|ƒD]k}|io[tid|i|ifƒ}x9|D]-}t	i
i|ƒo|i||ƒqFqFWqqWdS(Ns%s/%s(
RRRRRVtglobRUtmatchestmatchR*R+texistsR#(RRYRRZ((R
RWδs
cCs4|i|ƒpt|ƒ‚n|i||ƒdS(s%Add a included file to config sectionN(RRRRR#R)(RRR)((R
R$νs(RHRSt__doc__RRR.RWR$(((R
RTΧs
			s\$(\w+)cCs±g}x›|o“ti|ƒ}|p|i|ƒPn|idƒiƒ}|i
||iƒƒ}|iƒ\}}|i|| ƒ|i|ƒ||}q	Wdi|ƒS(sPerform variable replacement

    @param raw: String to perform substitution on.  
    @param vars: Dictionary of variables to replace. Key is variable name
        (without $ prefix). Value is replacement string.
    @return: Input raw string with substituted values.
    itN(tdoneRFt_KEYCREtsearchtmRtgrouptlowertvarnameR	RtreplacementtspantstarttendR<(RFR	RhRgRdRaR^Re((R
RPφs

cCsΌdk}tƒ}|i|idƒ|idddƒ|idddƒxL|iƒD]>}dG|GHx,|i|ƒD]\}}d	||fGHqxWqYW|it|idd
ƒƒdS(Nitonetat111tthreetfootbars***s%s = %rtwt(
tsysRtpR.targvRBRRRtktvRKRO(RRpRqRtRs((R
t_tests		
	t__main__(treRXR!RCR4R=tos.pathR*RRRRRTtcompileR_RPRuRH(RCRTRXRPR4RwRuR!R_RRRR*R=R((R
t?s							Ώ		


Anon7 - 2021