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/failover.pyo
mò
üüPc@sLdkZdfd„ƒYZdefd„ƒYZdefd„ƒYZdS(NtbaseFailOverMethodcBsDtZd„Zdd„Zd„Zdd„Zd„Zd„ZRS(NcCs||_d|_dS(Ni(trepotselftfailures(RR((t0/usr/lib/python2.4/site-packages/yum/failover.pyt__init__s	cCsdS(sÖReturns a serverurl based on this failover method or None 
           if complete failure.  If i is given it is a direct index
           to pull a server URL from instead of using the failures 
           counter.N(tNone(Rti((Rt
get_serverurlscCs|id|_dS(s<Tells the failover method that the current server is failed.iN(RR(R((Rt
server_failed%sicCs
||_dS(s,Reset the failures counter to a given index.N(RRR(RR((Rtreset)scCs|iS(s	Returns the current number of failures which is also the
           index into the list this object represents.  ger_serverurl()
           should always be used to translate an index into a URL
           as this object may change how indexs map.  (See RoundRobin)N(RR(R((Rt	get_index-scCst|iiƒS(s5Returns the how many URLs we've got to cycle through.N(tlenRRturls(R((RR5s(	t__name__t
__module__RRRR	R
RR(((RRs			tprioritycBstZdZed„ZRS(s6Chooses server based on the first success in the list.cCsO|djo
|i}n|}|t|iiƒjodSn|ii|S(sNReturns a serverurl based on this failover method or None if complete failure.N(RRRRtindexRRR
(RRR((RR@s

(RRt__doc__RR(((RR<st
roundRobincBs#tZdZd„Zed„ZRS(s&Chooses server based on a round robin.cCs3ti||ƒtiƒtiddƒ|_dS(Nii%(RRRRtrandomtseedtrandinttoffset(RR((RRSs
cCsl|djo
|i}n|}|t|iiƒjodSn||it|iiƒ}|ii|S(sNReturns a serverurl based on this failover method or None if complete failure.N(
RRRRRRRR
Rtrr(RRRR((RRXs

(RRRRRR(((RROs	(RRRR(RRRR((Rt?s	$

Anon7 - 2021