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/21585/root/usr/lib64/python2.4/site-packages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/site-packages/ForgeBlackBox.pyc
mò
äûEc@sWdkZdkZdkZdkZdklZd„Zdeifd„ƒYZdS(N(s	ProcessorcCs!|djo
t‚nt|ƒ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: Forge object
    N(tbox_cfgtNonet
ValueErrort
ForgeBlackBox(R((t3/usr/lib64/python2.4/site-packages/ForgeBlackBox.pytgetBoxs

RcBs tZdZd„Zd„ZRS(sŽo
    The ForgeBlackBox is the class which handles converting the xml with a XSLT
    stylesheet and writing this as a configuration file
    cCs[d|_|ii|_d|_d|_d|_d|_	t
i|ƒ|i
dƒiƒ|_yTti|itiƒo7ti|iƒti}ti|ƒp
t‚q´nWntd|id‚nXyB|i
dƒiƒ|_|idjo
d|_n
d|_Wntd‚nXy|i
d	ƒiƒ|_Wntd
‚nXdS(s@
        __init__: Initialize a ForgeBlackBox
        @self: the class instance
        @box_cfg: a box_cfg conformant AdmList element containing
                  the following elements:
                  xslstylesheetpath: a string
                  configfilepath: a string
                  mode: an integer
        iitxslstylesheetpaths\ForgeBlackBox box_cfg must contain a 'xslstylesheetpath' entry pointing at a readable file (t)tconfigfilepatht
SPLITFILESs;ForgeBlackBox box_cfg must contain a 'configfilepath' entrytmodes1ForgeBlackBox box_cfg must contain a 'mode' entryN(tselftstatust	__class__t
__module__tmet_errNoRt_errStrtreadabletwritablet	AlchemisttvalidateBoxCfgRtgetChildByNametgetValuetsspathtostaccesstR_OKtstattST_MODER
tS_ISREGRtcfgpatht
splitfiles(RRR
((Rt__init__s6						



c	Cso|iƒ}|pdSntƒ}|i|iƒ|i|ƒ}|i
djoYti|i
titiBtiB|iƒ}ti|dƒ}|i|ƒ|iƒnÀtidtitiBƒ}d}xš|o’|i|ƒ}|pPqÑ|idƒ}ti|idƒtitiBtiB|iƒ}ti|dƒ}|i|idƒƒ|iƒqÑWdS(	sÛ
        Extract xml, stylesheetpath and target file from the context
        and create the configuration file.
        @self: the class instance
        @context: the context from which to extract information
        itws^^--------CUTFILEHERE: (?P<filename>.*?)$(?P<content>.*?)^--------ENDFILEHERE?(?P<remaining>.*)it	remainingtfilenametcontentN(tcontextttoXMLt
xml_stringt	Processort	processortappendStylesheetFileRRt	runStringtresultR RtopenRtO_WRONLYtO_CREATtO_TRUNCR
tfdtfdopentfiletwritetclosetretcompilet	MULTILINEtDOTALLtmyregtmatchtsearchtgroup(	RR&R(R4R2R-R*R<R;((RR5Hs0	,
2(t__name__Rt__doc__R!R5(((RRs	,(	RRR7Rtxml.xslt.ProcessorR)RtBlackBoxR(RRR7RRRR)((Rt?s				
	

Anon7 - 2021