Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/spread/__pycache__/banana.cpython-39.pyc
Ðазад
a k�h�/ � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZ G d d � d e�Zdd� Zd d� ZdZdZdZdZdZdZdZdZdZdd� Zdaed� dZG dd� dejej �Z!e!� Z"e"�#� e"�$d� dd� Z%d d!� Z&dS )"z� Banana -- s-exp based protocol. Future Plans: This module is almost entirely stable. The same caveat applies to it as applies to L{twisted.spread.jelly}, however. Read its future plans for more details. @author: Glyph Lefkowitz � N)�BytesIO)�protocol)�styles)�log)� iterbytes)�fullyQualifiedNamec @ s e Zd ZdS )�BananaErrorN)�__name__� __module__�__qualname__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/spread/banana.pyr s r c C sH | dkr|d� d S | dks$J d��| rD|t | d@ f�� | d? } q$d S )Nr � z!can only encode positive integers� � )�bytes)�integer�streamr r r �int2b128 s r c C s6 d}d}t | �D ] }t|�}||| 7 }|dK }q|S )z� Convert an integer represented as a base 128 string into an L{int}. @param st: The integer encoded in a byte string. @type st: L{bytes} @return: The integer value extracted from the byte string. @rtype: L{int} � r r )r �ord)�st�e�i�char�nr r r �b1282int) s r � �� �� �� �� �� �� �� �c C s | a dS )ak Set the limit on the prefix length for all Banana connections established after this call. The prefix length limit determines how many bytes of prefix a banana decoder will allow before rejecting a potential object as too large. @type limit: L{int} @param limit: The number of bytes of prefix for banana to allow when decoding. N)� _PREFIX_LIMIT)�limitr r r �setPrefixLimitK s r'