Uname : Linux serv1.rebootns.com 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
Soft : LiteSpeed
Ip : 139.99.125.122
Port : 443
~
/
lib
/
python3.9
/
site-packages
/
rhn
/
__pycache__
[ HOME ]
Exec
Submit
File Name : SmartIO.cpython-39.pyc
a U��Zt � @ sV d Z ddlZzddlmZ W n ey: ddlmZ Y n0 G dd� d�Zdd� ZdS ) z* This module implements the SmartIO class � N)�StringIO)�BytesIOc @ s: e Zd ZdZddd�Zdd� Zdd � Zd d� Zdd � ZdS )�SmartIOa� 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 � @ r c C s$ || _ t� | _|rd| _nd| _d S )N� r )� _max_mem_sizer �_io�_fixed)�self�max_mem_sizeZ force_mem� r �//usr/lib/python3.9/site-packages/rhn/SmartIO.py�__init__ s zSmartIO.__init__c C s || _ d S �N�r )r r r r r �set_max_mem_size'