Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/s3transfer/__pycache__/bandwidth.cpython-39.pyc
Ðазад
a s�h-= � @ s� d dl Z d dlZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d d� de�ZG dd � d e�Z G dd� de�Z G dd� de�ZdS )� Nc s e Zd Z� fdd�Z� ZS )�RequestExceededExceptionc s, || _ || _d||f }tt| ��|� dS )a� Error when requested amount exceeds what is allowed The request that raised this error should be retried after waiting the time specified by ``retry_time``. :type requested_amt: int :param requested_amt: The originally requested byte amount :type retry_time: float :param retry_time: The length in time to wait to retry for the requested amount z<Request amount %s exceeded the amount available. Retry in %sN)� requested_amt� retry_time�superr �__init__)�selfr r �msg�� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/s3transfer/bandwidth.pyr s ��z!RequestExceededException.__init__)�__name__� __module__�__qualname__r � __classcell__r r r r r s r c @ s e Zd ZdZdS )�RequestTokenzDA token to pass as an identifier when consuming from the LeakyBucketN)r r r �__doc__r r r r r ( s r c @ s e Zd Zdd� Zdd� ZdS )� TimeUtilsc C s t � � S )zgGet the current time back :rtype: float :returns: The current time in seconds )�time�r r r r r . s zTimeUtils.timec C s t �|�S )zwSleep for a designated time :type value: float :param value: The time to sleep for in seconds )r �sleep)r �valuer r r r 6 s zTimeUtils.sleepN)r r r r r r r r r r - s r c @ s e Zd Zddd�Zddd�ZdS ) �BandwidthLimiterNc C s || _ || _|du rt� | _dS )a Limits bandwidth for shared S3 transfers :type leaky_bucket: LeakyBucket :param leaky_bucket: The leaky bucket to use limit bandwidth :type time_utils: TimeUtils :param time_utils: Time utility to use for interacting with time. N)� _leaky_bucket�_time_utilsr )r �leaky_bucket� time_utilsr r r r @ s zBandwidthLimiter.__init__Tc C s"