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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/site-packages/ldap/async.pyc
mò
Þë9Dc@sdZdkZdZheid<eid<eid<Zheid<eid<Zde	fd„ƒYZ
dfd„ƒYZdefd„ƒYZd	efd
„ƒYZ
de
fd„ƒYZd
efd„ƒYZdefd„ƒYZdefd„ƒYZdS(s
ldap.async - handle async LDAP operations
written by Michael Stroeder <michael@stroeder.com>

See http://python-ldap.sourceforge.net for details.

\$Id: async.py,v 1.25 2006/04/10 05:19:09 stroeder Exp $

Python compability note:
Tested on Python 2.0+ but should run on Python 1.5.x.
Ns0.1.0tWrongResultTypecBstZd„Zd„ZRS(NcCs#||_||_ti|ƒdS(N(treceivedResultTypetselftexpectedResultTypest	Exceptiont__init__(RRR((t0/usr/lib64/python2.4/site-packages/ldap/async.pyR s		cCsd|idi|iƒfS(Ns3Received wrong result type %s (expected one of %s).s, (RRtjoinR(R((Rt__str__%s(t__name__t
__module__RR(((RRs	tAsyncSearchHandlercBs_tZdZd„Zedddeed„Zd„Zd„Zdddd„Zd„Z	RS(	s6
  Class for stream-processsing LDAP search results
  cCs||_d|_dS(sa
    Initialize a StreamResultHandler
    
    Parameters:
    l
        LDAPObject instance
    N(tlRt_ltNonet_msgId(RR((RR1s	iiÿÿÿÿc


Cs1|ii|||||||	||ƒ	|_dS(s¥
    searchRoot
        See parameter base of method LDAPObject.search()
    searchScope
        See parameter scope of method LDAPObject.search()
    filterStr
        See parameter filter of method LDAPObject.search()
    attrList=None
        See parameter attrlist of method LDAPObject.search()
    attrsOnly
        See parameter attrsonly of method LDAPObject.search()
    timeout
        Maximum time the server shall use for search operation
    sizelimit
        Maximum number of entries a server should return
        (request client-side limit)
    serverctrls
        list of server-side LDAP controls
    clientctrls
        list of client-side LDAP controls
    N(
RR
t
search_extt
searchRoottsearchScopet	filterStrtattrListt	attrsOnlytserverctrlstclientctrlsttimeoutt	sizelimitR(
RRRRRRRRRR((RtstartSearch<s cCsdS(sd
    Do anything you want after starting search but
    before receiving and processing results
    N((R((Rt
preProcessingcscCsdS(sE
    Do anything you want after receiving and processing results
    N((R((RtpostProcessingisc
Csœ|iƒd}||}
d}d}d|_||_	z$d\}}x|o	xA|djo3|o+|i
i|id|ƒ\}}}}	qTW|pPnti|ƒpt|tiƒƒ‚nxt|D]l}||jo|id|_n<|djp
||
jo|i||ƒnd}d}P|d}qÑWd\}}||_	qJWWd|o'|idjo|i
i|iƒnX|iƒ|S(s1
    ignoreResultsNumber
        Don't process the first ignoreResultsNumber results.
    processResultsCount
        If non-zero this parameters indicates the number of results
        processed is limited to processResultsCount.
    timeout
        See parameter timeout of ldap.LDAPObject.result()
    iiN(NN(NN(RRtresult_countertignoreResultsNumbertprocessResultsCounttend_result_countertgo_aheadtpartialtbeginResultsDroppedtendResultBreakRtresult_typetresult_listR
tresult3RRtresult_msgidtresult_serverctrlst_searchResultTypesthas_keyRtkeystresult_itemt_processSingleResulttabandonR(
RRRRR&R"RR(R-R)R R!R%((RtprocessResultsnsH	

		,

cCsdS(sv
    Process single entry

    resultType
        result type
    resultItem
        Single item of a result list
    N((Rt
resultTypet
resultItem((RR.›s(
R	R
t__doc__RRRRRR0R.(((RR,s	'		-tListcBs tZdZd„Zd„ZRS(s¾
  Class for collecting all search results.
  
  This does not seem to make sense in the first place but think
  of retrieving exactly a certain portion of the available search
  results.
  cCsti||ƒg|_dS(N(RRRRt
allResults(RR((RR°scCs|ii||fƒdS(N(RR5tappendR1R2(RR1R2((RR.´s(R	R
R3RR.(((RR4§s	tDictcBs tZdZd„Zd„ZRS(sJ
  Class for collecting all search results into a dictionary {dn:entry}
  cCsti||ƒh|_dS(N(RRRRt
allEntries(RR((RR½scCs1ti|ƒo|\}}||i|<ndS(N(t_entryResultTypesR+R1R2tdntentryRR8(RR1R2R:R;((RR.Ás(R	R
R3RR.(((RR7¸s	tIndexedDictcBs#tZdZed„Zd„ZRS(s„
  Class for collecting all search results into a dictionary {dn:entry}
  and maintain case-sensitive equality indexes to entries
  cCs?ti||ƒ|ptƒ|_hi|ihƒ|_dS(N(R7RRRt
indexed_attrsttupletfromkeystindex(RRR=((RRÎscCs´ti|ƒo |\}}||i|<x„|iD]u}|i|ƒo_x\||D]L}y|i||i|ƒWqTt
j
o|g|i||<qTXqTWq3q3WndS(N(R9R+R1R2R:R;RR8R=tatvR@R6tKeyError(RR1R2R:RARBR;((RR.Ós

(R	R
R3RRR.(((RR<Èst
FileWritercBs/tZdZddd„Zd„Zd„ZRS(sH
  Class for writing a stream of LDAP search results to a file object
  tcCs/ti||ƒ||_||_||_dS(s¦
    Initialize a StreamResultHandler
    
    Parameters:
    l
        LDAPObject instance
    f
        File object instance where the LDIF data is written to
    N(RRRRtft_ft	headerStrt	footerStr(RRRFRHRI((RRæs
			cCs|ii|iƒdS(ss
    The headerStr is written to output after starting search but
    before receiving and processing results.
    N(RRGtwriteRH(R((RRõscCs|ii|iƒdS(sX
    The footerStr is written to output after receiving and
    processing results.
    N(RRGRJRI(R((RRüs(R	R
R3RRR(((RRDás	t
LDIFWritercBs&tZdZddd„Zd„ZRS(sC
  Class for writing a stream LDAP search results to a LDIF file
  REcCs^dk}t||iƒo
||_n|i|ƒ|_ti|||ii	||ƒdS(sÈ
    Initialize a StreamResultHandler
    
    Parameters:
    l
        LDAPObject instance
    writer_obj
        Either a file-like object or a ldif.LDIFWriter instance
        used for output
    N(tldift
isinstancet
writer_objRKRt_ldif_writerRDRRt_output_fileRHRI(RRRNRHRIRL((RR	s
	
cCs7ti|ƒo#|\}}|ii||ƒndS(N(	R9R+R1R2R:R;RROtunparse(RR1R2R:R;((RR.s(R	R
R3RR.(((RRKst
DSMLWritercBs&tZdZddd„Zd„ZRS(sC
  Class for writing a stream LDAP search results to a DSML file
  REcCs^dk}t||iƒo
||_n|i|ƒ|_ti|||ii	||ƒdS(sÄ
    Initialize a StreamResultHandler

    Parameters:
    l
        LDAPObject instance
    writer_obj
        Either a file-like object or a ldif.DSMLWriter instance
        used for output
    N(tdsmlRMRNRRRt_dsml_writerRDRRRPRHRI(RRRNRHRIRS((RR&s
	
cCs7ti|ƒo#|\}}|ii||ƒndS(N(	R9R+R1R2R:R;RRTRQ(RR1R2R:R;((RR.8s(R	R
R3RR.(((RRR!s(R3tldapt__version__tRES_SEARCH_ENTRYRtRES_SEARCH_RESULTtRES_SEARCH_REFERENCER*R9RRRR4R7R<RDRKRR(R<RRRR4RRDR9RKR7RUR*RV((Rt?s	*{#

Anon7 - 2021