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/21573/root/usr/lib/python2.4/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/yum/parser.pyc
mò
üüPc@s\dkZdkZdkZdkZdkZeidƒZd„Zdfd„ƒYZ	dS(Ns\$(\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(tdonetrawt_KEYCREtsearchtmtappendtgrouptlowertvarnametvarstgettreplacementtspantstarttendtjoin(RR
RRR	RRR((t./usr/lib/python2.4/site-packages/yum/parser.pyt
varReplaces

tConfigPreProcessorcBsStZdZed„Zdd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s¡
    ConfigParser Include Pre-Processor

    File-like Object capable of pre-processing include= lines for
    a ConfigParser. 

    The readline function expands lines matching include=(url)
    into lines from the url specified. Includes may occur in
    included files as well. 

    Suggested Usage::
        cfg = ConfigParser.ConfigParser()
        fileobj = confpp( fileorurl )
        cfg.readfp(fileobj)
    cCs¾||_d|_d|_ti|ƒd}|djo7|ddjot	i
ƒd|}nd|}n|}g|_g|_
|i|ƒ}|djotid|‚ndS(NtriRt/sfile://sError accessing file: %s(R
tselft_varstNonet_sectiontmodeturlparset
configfiletschemetostgetcwdturlt	_incstackt_alreadyincludedt	_pushfiletfotErrorstConfigError(RRR
R RR$((Rt__init__:s			
		
icCsd}xêt|iƒdjoÓ|id}|iƒ}t|ƒdjo™tid|ƒ}|oL|i	dƒ}t|ƒdjotid|i
‚qà|i|ƒ}qîtid|ƒ}|o|i	dƒ|_nPq	|iƒq	W|iot||iƒSn|S(
sÖ
        Implementation of File-Like Object readline function. This should be
        the only function called by ConfigParser according to the python docs.
        We maintain a stack of real FLOs and delegate readline calls to the 
        FLO on top of the stack. When EOF occurs on the topmost FLO, it is 
        popped off the stack and the next FLO takes over. include= lines 
        found anywhere cause a new FLO to be opened and pushed onto the top 
        of the stack. Finally, we return EOF when the bottom-most (configfile
        arg to __init__) FLO returns EOF.
        
        Very Technical Pseudo Code::
        
            def confpp.readline() [this is called by ConfigParser]
                open configfile, push on stack
                while stack has some stuff on it
                    line = readline from file on top of stack
                    pop and continue if line is EOF
                    if line starts with 'include=' then
                        error if file is recursive or duplicate
                        otherwise open file, push on stack
                        continue
                    else
                        return line
                
                return EOF
        Riiÿÿÿÿs\s*include\s*=\s*(?P<url>.*)R s>Error parsing config %s: include must specify file to include.s\s*\[(?P<section>.*)\]tsectionN(tlinetlenRR!R$treadlinetretmatchRRR R%R&tnameR#tsecmatchRt_popfileRR(RtsizeR RR)R/R$((RR+Zs*

cCs8t|iƒdjo|Snti|iƒ|ƒSdS(sî
        Returns an absolute url for the (possibly) relative
        url specified. The base url used to resolve the
        missing bits of url is the url of the file currently
        being included (i.e. the top of the stack).
        iN(R*RR!R Rturljointgeturl(RR ((Rt_absurl™scCs¾|i|ƒ}||if}|i|ƒodSnyti	i
|ƒ}Wn!ti	ij
o}d}nX|dj	o-||_|ii|ƒ|ii|ƒntid|‚|S(så
        Opens the url specified, pushes it on the stack, and 
        returns a file like object. Returns None if the url 
        has previously been included.
        If the file can not be opened this function exits.
        s"Error accessing file for config %sN(RR4R tabsurlRtincludetuplet_isalreadyincludedRt
urlgrabbertgrabberturlopenR$tURLGrabErrorteR.R!RR"R%R&(RR R<R5R6R$((RR#§s
	cCsV|iiƒ}|iƒt|iƒdjo|idiƒ|_n
d|_dS(sW
        Pop a file off the stack signaling completion of including that file.
        iiÿÿÿÿN(	RR!tpopR$tcloseR*R3R.R(RR$((RR0Ès
cCs-x&|iD]}||jodSq
q
WdS(sˆ
        Checks if the tuple describes an include that was already done.
        This does not necessarily have to be recursive
        iiN(RR"tetuplettuple(RR@R?((RR7Ôs

cCs|iS(N(RR.(R((RR3Þs(t__name__t
__module__t__doc__RR'R+R4R#R0R7R3(((RR(s ?		!		
(
R,RR8tos.pathRR%tcompileRRR(RR%R8RR,RRR((Rt?s						

Anon7 - 2021