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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/site-packages/sabayon/util.pyc
m
fEOc
@s0dkZdkZdkZdkZdkZdkZdkZdkZdkZdk	Z	dk
Z
dkTed\
Z
ZZZZZZZZZZZZhe
def<edef<edef<edef<edef<edef<ed	ef<ed
ef<edef<edef<ed
ef<edef<edef<ZdZeddZdefdYZda!dZ"dZ#dZ$dZ%dZ&dZ'dddZ(dZ)dZ*dZ+dfd YZ,d!Z-d"Z.d#Z/dS($N(t*i
t
deprecatedsuser-profiletstorages
proto-sessiontusermodsdir-monitorsgconf-sourcespanel-delegatesfiles-sourcesmozilla-sources
admin-toolsuser-dbtcachecCstid}|ptiddtidSn|djoGdGHdGHxtD]}dt|dGHqRWd	GHd
GHt	i
dn|djo-xtD]}t|dd
ft|<qWnx|idD]}|id}|d}t}t|djot|dd}nx8tD]0}t|d|jo||ft|<Pq(q(WqWttdptiddtindS(Nt
SABAYON_DEBUGtignoretcategorythelps>Valid options for the SABAYON_DEBUG environment variable are:
s    alls    %sis9You may supply a list of modules separated by a colon (:)sIYou may also supply an optional hex debug mask to a module, e.g. foo=0xF8itallIt:t=i(tostgetenvtdebug_valuetwarningstfilterwarningst
exceptionstDeprecationWarningt
debug_modulestmoduletsystexittsplittitemtkeytTruetvaluetlentinttDEBUG_DEPRECATED(RRRRR((t2/usr/lib64/python2.4/site-packages/sabayon/util.pytinit_debug_modules@s>

 

icCsVti|ptt|d|@pdSndtit|d|fGHdS(Nis(%d) %s: %si(Rthas_keyRtAssertionErrortmaskRtgetpidtmessage(RR%R#((Rtdebug_printbstGeneralErrorcBstZdZRS(NcCsti||dS(N(t	Exceptiont__init__tselftmsg(R*R+((RR)is(t__name__t
__module__R)(((RR'hscCs
|adS(N(thomedirtunit_tests_homedir(R.((Rtset_home_dir_for_unit_testsmscCstotSny4titi}|idjo|iSnWntj
onXtii	dotidSnt
tddS(NttHOMEsXCannot find home directory: not set in /etc/passwd and no value for $HOME in environment(R/tpwdtgetpwuidRtgetuidtpwtpw_dirtKeyErrortenvironR!R't_(R6((Rtget_home_dirqscCsy4titi}|idjo|iSnWntj
onXtiidotidSnt	t
ddS(NR1tUSERsRCannot find username: not set in /etc/passwd and no value for $USER in environment(R3R4RR5R6tpw_nameR8R9R!R'R:(R6((Rt
get_user_namescCs)dk}dk}|id|idS(Ntfile(t	tracebackRt	print_exctstderr(RR@((Rtprint_exceptions		cCs'titidtittdS(sBinds _() to gettext.gettext() in the global namespace. Run
    util.init_gettext() at the entry point to any script and you'll
    be able to use _() to mark strings for translation.
    R1N(tlocalet	setlocaletLC_ALLtgettexttinstalltPACKAGEt	LOCALEDIR(((Rtinit_gettextscCsBd}x5|djo'|d}|ttid}q	W|S(s@Returns a string with random binary data of the specified lengthR1iiiN(tbinRtchrtrandomtgetrandbits(RRL((Rt
random_strings

cCsntii|}|dj	otii|}|ddjo|d}n|i|p
tnt|}t|}||d}||djo
tn|| ||dfSn|dj	otii|}|ddjo|d }n|i|p
tnt|}|}||djo
tn|| ||dfSntdS(s&Given a path split it into a head and tail. If head is passed then
    it is assumed to comprise the first part of the full path. If tail is
    passed it is assumed to comprise the second part of the full path.
    The path, head, and tail are made canonical via os.path.normpath prior
    to the operations. ValueErrors are raised if head is not present at the
    start of the path or if the path does not end with tail. The split must
    occur on a directory separator boundary.

    The return value is the tuple (head, tail) in canonical form.it/iiN(RtpathtnormpathttailtNonetendswitht
ValueErrorRtpath_lenttail_lent	dir_splittheadt
startswiththead_len(RRR[RTRZR]RXRY((Rt
split_paths4	





cCszy>|djoti|||nti||||Wn5tij
o&\}}|tijoqvnXdS(N(
tenvRURtspawnvtmodeR?targstspawnveterrorterrterrstrterrnotEINTR(RaR?RbR_ReRf((Rtuninterruptible_spawnves
cCst|||ddS(N(RiRaR?RbRU(RaR?Rb((Rtuninterruptible_spawnvscCszt}|djpttdjpttdtdjpttdt|jptdS(NR1tfoo(R;thome_dirR"R>R0RU(Rl((Rtrun_unit_testss	

tDictComparecBsbtZdZdZdZdZdZdZdZdZ	d	Z
d
ZRS(NcCs||_||_dS(N(taR*tb(R*RoRp((RR)s	cCsI|ii|_|ii|_g|_g|_g|_g|_	g|_
h|_h|_h|_
xH|iD]=}|ii|o|ii|qv|ii|qvWx8|iD]-}|ii|p|ii|qqWxP|iD]E}|i||i|jo|i	i|q|i
i|qWdS(s Given two dictionaries a,b analyze them for their
        differences and similarities.

        intersection - keys shared between a and b
        only_a       - keys only present in a
        only_b       - keys only present in b
        equal        - keys present in both a and b whole values are equal
        not_equal    - keys present in both a and b whole values are not equalN(R*Rotkeystkeys_aRptkeys_btintersectiontonly_atonly_btequalt	not_equalt_addt_delt_modtkR!tappend(R*R|((Rtcompares2								


cCs|iS(s*return list of keys shared between a and bN(R*Rt(R*((RRtscCs|iS(s%return list of keys only present in aN(R*Ru(R*((RRuscCs|iS(s%return list of keys only present in bN(R*Rv(R*((RRvscCs|iS(sBreturn list of keys present in both a and b whole values are equalN(R*Rw(R*((RRwscCs|iS(sFreturn list of keys present in both a and b whole values are not equalN(R*Rx(R*((RRx#sc	CsS||jp|djp
|djo
tn|djo(|i}|i}|i}|i}n<|djo(|i}|i}|i}|i}nth|_x|D]}|||i|<qWh|_
x|D]}|||i
|<qWh|_x"|iD]}|||i|<q
Whd|i<d|i
<d|i<}|S(sReturn changes necessary to make dict_lhs equivalent to dict_rhs,
        (e.g. lhs = rhs), the two dictionary parameters are specified as
        either the string 'a' or the string 'b' corresponding to the parameters
        this class was created with.
        
        Return value is a dictionary with 3 keys (add, del, mod) whose values
        are dictionaries containing containing (key,value) pairs to add,
        delete, or modify respectively in dict_lhs.tabRoRptaddtdeltmodN(tdict_lhstdict_rhsRWR*RoRpRuRvRyR|RzR{Rxt
change_set(	R*RRRoRpRRuRvR|((Rtget_change_set's8'

			

			
			
*cCsRt|idjo4t|idjot|idjotSntSdS(Ni(RR*RuRvRxRtFalse(R*((Rtis_equalQsBcCsmddi|iGHddi|iGHddi|iGHddi|iGHddi|iGHdS(s/Print the results of the dictionary comparisionsintersection = %st,sonly a = %ssonly b = %ss
equal = %ssnot equal = %sN(tjoinR*RtRuRvRwRx(R*((RtdumpWs(R,R-R)R~RtRuRvRwRxRRR(((RRns		&						*	cCs|d}|d}|d}t|io3dGHx+|iD]}d|||fGHqCWnt|io3dGHx+|iD]}d|||fGHqWnt|io3dGHx+|iD]}d|||fGHqWndS(NRRRsKey/Values to ADDs	    %s=%ssKeys to DELETEsKey/Values to Modify(tcsRyRzR{RRqR|(RRzR|RyR{((Rtdump_change_set_s$





cCstii|}xJ|D]B}tiitii||}t	i	||ot
SqqWtii|}||jot
|||SntSdS(N(RRRRStdirtignore_dir_listt
ignore_dirRtbase_dirtignore_pathtfnmatchRtdirnametparenttshould_ignore_dirR(RRRRRR((RRss!
cCs{tii|}xJ|D]B}tiitii||}t	i	||ot
SqqWt||tii
|S(N(RRRRSR?tignore_file_listtignore_fileRRRRRRRR(RRRR?RR((Rtshould_ignore_files!(0Rtos.pathRRR3RGRDRgRRRNtconfigtrangeRtDEBUG_USERPROFILEt
DEBUG_STORAGEtDEBUG_PROTOSESSIONt
DEBUG_USERMODtDEBUG_DIRMONITORtDEBUG_GCONFSOURCEtDEBUG_PANELDELEGATEtDEBUG_FILESSOURCEtDEBUG_MOZILLASOURCEtDEBUG_ADMINTOOLtDEBUG_USERDBtDEBUG_CACHERRR R&R(R'RUR/R0R;R>RCRKRPR^RiRjRmRnRRR()RR;RRPRiRDRNRR RRRRR0RRmRgRRGRRRRRRCR>RRR3RRKRRnR^RjRR'RRRR&((Rt?s@											3	 			
				-	
		w		

Anon7 - 2021