PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  Qc@sNdZddlZddlmZdddYZddZdZdS( s* This module implements the SmartIO class iN(tStringIOtSmartIOcBsAeZdZdddZdZdZdZdZRS(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|jjd|_||_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|jddtjd|\}}tj|tj|dS(Nitprefixs_rhn_transports-%d-tdirswb+(ttempfiletgetDefaultStoragetmkstemptostgetpidtunlinktfdopen(ttmpdirRtfdtfname((s//usr/lib/python2.7/site-packages/rhn/SmartIO.pyR ;s    cCsd}d}yt|}Wntk r0|SXx`|jD]R}|jdr>|jd}t|dkr|djp|}qq>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 startswithtsplitR tstriptclose(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 s  +