https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /proc/self/root/lib/python2.7/site-packages/rhn/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/lib/python2.7/site-packages/rhn/SmartIO.pyo
�
��Qc@sNdZddlZddlmZddd��YZdd�Zd�ZdS(	s*
This module implements the SmartIO class
i����N(tStringIOtSmartIOcBsAeZdZddd�Zd�Zd�Zd�Zd�ZRS(s�
    The SmartIO class allows one to put a cap on the memory consumption.
    StringIO objects are very fast, because they are stored in memory, but
    if they are too big the memory footprint becomes noticeable.
    The write method of a SmartIO determines if the data that is to be added
    to the (initially) StrintIO object does not exceed a certain threshold; if
    it does, it switches the storage to a temporary disk file
    i@icCs4||_t�|_|r'd|_n	d|_dS(Nii(t
_max_mem_sizeRt_iot_fixed(tselftmax_mem_sizet	force_mem((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyt__init__s
	cCs
||_dS(N(R(RR((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pytset_max_mem_size%scCs|jS(N(R(R((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pytget_max_mem_size(scCsv|jsbt|�|jj�|jkrbt�}|j|jj��d|_||_qbn|jj|�dS(Ni(RtlenRttellRt	_tempfiletwritetgetvalue(Rtdatattmpfile((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyR+s	"		cCst|j|�S(N(tgetattrR(Rtname((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyt__getattr__7s(t__name__t
__module__t__doc__RR	R
RR(((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyRs			cCscddl}|st�}n|jddtj�d|�\}}tj|�tj|d�S(Ni����tprefixs_rhn_transports-%d-tdirswb+(ttempfiletgetDefaultStoragetmkstemptostgetpidtunlinktfdopen(ttmpdirRtfdtfname((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyR
;s
cCs�d}d}yt|�}Wntk
r0|SXx`|j�D]R}|jd�r>|jd�}t|�dkr�|dj�p�|}q�q>q>W|j�|S(sY Reads the default temp dir from up2date config.
    if defined uses that else use /tmp. s/etc/sysconfig/rhn/up2dates/tmpstmpDir=t=ii����(topentIOErrort	readlinest
startswithtsplitRtstriptclose(t
up2dateCfgR!tftlinetcfgdir((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyREs
 
((RRt	cStringIORRtNoneR
R(((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyt<module>s
+

https://t.me/AnonymousX5 - 2025