%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/uaclient/api/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/uaclient/api/__pycache__/__init__.cpython-312.pyc

�

�ϴf	����ddlZddlZddlmZejd�jej��Gd�dej��ZGd�de�Z	Gd	�d
�Z
y)�N)�Optional�	ubuntuproc
�N�eZdZejdededeedeefd��Zy)�AbstractProgress�total_steps�
done_steps�previous_step_message�current_step_messagec��y�N���selfrrr	r
s     �7/usr/lib/python3/dist-packages/uaclient/api/__init__.py�progresszAbstractProgress.progress
s��	
�N)	�__name__�
__module__�__qualname__�abc�abstractmethod�intr�strrr
rrrr	sJ�����
��
��	
�
 (��}�
�'�s�m�

��
rr)�	metaclassc	�0�eZdZdededeedeefd�Zy)�NullProgressrrr	r
c��yrr
rs     rrzNullProgress.progresss��	
rN)rrrrrrrr
rrrrs7��
��
��	
�
 (��}�
�'�s�m�

rrc�L�eZdZddeefd�Zdefd�Zd�Zddefd�Z	d	e
fd
�Zy)�ProgressWrapperN�progress_objectc�`�|�||_nt�|_d|_d|_d|_y)Nr���)r rrrr	)rr s  r�__init__zProgressWrapper.__init__#s1���&�#2�D� �#/�>�D� �������%)��"r�messagec��|jj|j|j|j|��||_|xjdz
c_y)N�rrr	r
�)r rrrr	)rr$s  rrzProgressWrapper.progress,sO�����%�%��(�(����"&�"<�"<�!(�		&�	
�&-��"����1��rc��|j|_|jj|j|j|jd��y)Nr&)rrr rr	�rs r�finishzProgressWrapper.finish6sD���*�*������%�%��(�(����"&�"<�"<�!%�		&�	
r�eventc�j�t|jd�r|jj||�yy)z�
        This is our secret event system. We use it internally to insert prompts
        and extra messages in the middle of operations at certain points.
        We don't consider this stable enough to expose to the public API.
        �	_on_eventN)�hasattrr r-)rr+�payloads   r�emitzProgressWrapper.emit?s/���4�'�'��5�� � �*�*�5�'�:�6r�returnc�\�t|jd�r|jjSy)N�is_interactiveF)r.r r3r)s rr3zProgressWrapper.is_interactiveHs(���4�'�'�)9�:��'�'�6�6�6�rr)rrrrrr#rrr*r0�boolr3r
rrrr"s=��*��1A�(B�*����
�;�#�;���rr)r�logging�typingr�	getLogger�
addHandler�NullHandler�ABCMetarrrr
rr�<module>r;s^��
�������+��)�)�*=�'�*=�*=�*?�@�

����

�	
�#�	
�*�*r

Zerion Mini Shell 1.0