HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //lib/python2.7/site-packages/jabber/debug.pyo
�
���?c@s�dZddlZddlZddlmZddlZgaed�dZed�dZ	ed�dZ
ed�dZed�d	Zed�d
Z
ed�dZed�dZed�d
Zed�dZed�dZed�dZed�dZed�dZed�dZed�dZed�dZdZtje�dZtje�ddd��YZdZddd��YZdS(s1.4.0i����N(tjoinis[0ms[30ms[31ms[32ms[33ms[34ms[35ms[36ms[37ms[30;1ms[31;1ms[32;1ms[33;1ms[34;1ms[35;1ms[36;1ms[37;1mtinittalwaystNoDebugcBs/eZd�Zd�Zd�Zdd�ZRS(cOsdS(N((tselftargstkwargs((s0/usr/lib/python2.7/site-packages/jabber/debug.pyt__init__iscOsdS(N((RRR((s0/usr/lib/python2.7/site-packages/jabber/debug.pytshowkscCsdS(N((Rtflag((s0/usr/lib/python2.7/site-packages/jabber/debug.pyt	is_activemscCsdS(Ni((Rtactive_flags((s0/usr/lib/python2.7/site-packages/jabber/debug.pyt
active_setosN(t__name__t
__module__RRR
tNoneR(((s0/usr/lib/python2.7/site-packages/jabber/debug.pyRhs			s
tDebugc
Bs�eZdejdddddddd�	Zddddd�Zd�Zdd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
RS(sDEBUG: s
iii����c

Cs t|�tg�td�gkrHdGHd|GHdGHdGHtg}n|dkrx|rot|�rod}qxd}n|j�|r�t|�td�kr�yt|d	�|_Wq�d
GHtjd�q�Xq�||_ntj|_|dkrd|}
d
|
�n||_	||_
||_d|_
||_|	|_|j|�|r�|jd�tjd�}yd|jd}Wn
d}nX|jd|jj|f�|jdt|j��nt|�td�td�fkr||_
ndt|�}
d|
�dS(Ns***s.*** Invalid or oldformat debug param given: %ss4*** please correct your param, should be of [] type!s)*** Due to this, full debuging is enabledi����iittwsERROR: can open %s for writingis%ssInvalid time_stamp params:%sR
sDebug created for %s%ss flags defined: %ssInvalid type for flag_show!((iii(ttypet
DBG_ALWAYStlent_remove_dupe_flagstopent_fhtsystexittstdouttprefixtsufixt
time_stampRt	flag_showtvalidate_flagstencodingRRt	_getframetf_localstf_codetco_filenameRtactive(
RRtlog_fileRRRRR twelcomeR!tmsg2tcallertmod_name((s0/usr/lib/python2.7/site-packages/jabber/debug.pyRwsX/$			

						


$c
Cse|jr|j|�n|j|�s,dS|r;|}n	|j}|rS|}n	|j}|jdkr�d|tjdtjtj���f}nC|jdkr�dtjdtjtj���|f}n|}|j	r|rd|||j	f}qd||j	f}nt
|�t
d�krS|jrS|j|jd	�}nd|||f}|r�|d
}	|dkr�|	t
kr�|t
}q�|d
kr�|	t
kr�|d
 }q�ny|jj|�Wnzd}
xMtt|��D]9}t||�dkr||}nd}|
|}
q�W|jjd||
|f�nX|jj�dS(
s�
        flag can be of folowing types:
            None - this msg will always be shown if any debugging is on
            flag - will be shown if flag is active
            (flag1,flag2,,,) - will be shown if any of the given flags 
                               are active

        if prefix / sufix are not given, default ones from init will be used
        
        lf = -1 means strip linefeed if pressent
        lf = 1 means add linefeed if not pressent
        Nis%s%s s%b %d %H:%M:%Sis%s %ss%s%s%sutreplacei����i�t?(R t_validate_flagR
RRRttimetstrftimet	localtimeRRR!tencodet	LINE_FEEDRtwritetrangeRtordtflush(
RtmsgR	RRtlftpretsuftoutputt	last_chartstitc((s0/usr/lib/python2.7/site-packages/jabber/debug.pyR�sV						
	!


!cCs�|js
dS|s2||jks2t|jkr6dSt|�td�tg�fkr�x$|D]}||jkradSqaWndS(s(If given flag(s) should generate output.ii((R&RR(RR	R>((s0/usr/lib/python2.7/site-packages/jabber/debug.pyR
,s	%$
cCs2d}g}|sg|_nt|�tjtjfkr�|j|�}x3|D]+}|tkrpdG|GHqR|j|�qRW||_d}n�y|jd�}WnH|j	d�|j	d|�|j	d�|j	d�t|_nXx'|D]}|j
�}|j|�q�W||_|j�|S(	s7returns 1 if any flags where actually set, otherwise 0.isInvalid debugflag givenit,s***s!*** Invalid debug param given: %ss*** please correct your param!s)*** due to this, full debuging is enabled(R&Rttypest	TupleTypetListTypet_as_one_listtdebug_flagstappendtsplitRtstripR(RRtrtok_flagstflagstttfR>((s0/usr/lib/python2.7/site-packages/jabber/debug.pyR=s4
		




	
cCs|jS(sreturns currently active flags.(R&(R((s0/usr/lib/python2.7/site-packages/jabber/debug.pyt
active_getascCs�t|�tg�kr7t|�td�kr7|gSg}x{|D]s}t|�tg�kr�|j|�}xC|D]}|j||�qxWqD|dkr�qDqD|j||�qDW|S(s� init param might contain nested lists, typically from group flags.
        
        This code organises lst and remves dupes
        (N(RREt_append_unique_strR(RtitemsRJtltlst2tl2((s0/usr/lib/python2.7/site-packages/jabber/debug.pyREfs0

cCsNt|�td�kr.d|}d|�n||krJ|j|�n|S(sfilter out any dupes.Rs%ss$Invalid item type (should be string)(RRG(RtlsttitemR)((s0/usr/lib/python2.7/site-packages/jabber/debug.pyRPzs
cCsI|rEx<|j|�D](}|tkrd|}d|�qqWndS(sverify that flag is defined.s%ssInvalid debugflag givenN(RERF(RRLRNR)((s0/usr/lib/python2.7/site-packages/jabber/debug.pyR.�s

cCs=g}x*tD]"}||kr
|j|�q
q
W|adS(s�
        if multiple instances of Debug is used in same app, 
        some flags might be created multiple time, filter out dupes
        N(RFRG(Rtunique_flagsRN((s0/usr/lib/python2.7/site-packages/jabber/debug.pyR�s

N(R
RRRtstderrRRR
RRORERPR.R(((s0/usr/lib/python2.7/site-packages/jabber/debug.pyRvs$	=	K	$			
	(((t	_version_RR/tstringRRBRFtchrt
color_nonetcolor_blackt	color_redtcolor_greentcolor_brownt
color_bluet
color_magentat
color_cyantcolor_light_graytcolor_dark_graytcolor_bright_redtcolor_bright_greentcolor_yellowtcolor_bright_bluetcolor_purpletcolor_bright_cyantcolor_whitetDBG_INITRGRRR3R(((s0/usr/lib/python2.7/site-packages/jabber/debug.pyt<module>s:!