![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/apt/progress/__pycache__/ |
o 4��fW1 � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl mZmZ ddl Z g d�ZG dd� de�ZG dd � d e�ZG d d� de�ZG dd � d e�ZdS )z�Base classes for progress reporting. Custom progress classes should inherit from these classes. They can also be used as dummy progress classes which simply do nothing. � )�print_functionN)�Optional�Union)�AcquireProgress� CdromProgress�InstallProgress� OpProgressc @ sp e Zd ZdZd Z Z Z ZZd Z Z Zdd� Zdd� Z dd � Zd d� Zdd � Zdd� Zdd� Zdd� ZdS )r z�Monitor object for downloads controlled by the Acquire class. This is an mostly abstract class. You should subclass it and implement the methods to get something useful. � r c C � dS )z<Invoked when an item is successfully and completely fetched.N� ��self�itemr r �3/usr/lib/python3/dist-packages/apt/progress/base.py�done5 � zAcquireProgress.donec C r )z*Invoked when an item could not be fetched.Nr r r r r �fail9 r zAcquireProgress.failc C r )z0Invoked when some of the item's data is fetched.Nr r r r r �fetch= r zAcquireProgress.fetchc C r )z�Invoked when an item is confirmed to be up-to-date. Invoked when an item is confirmed to be up-to-date. For instance, when an HTTP download is informed that the file on the server was not modified. Nr r r r r �ims_hitA r zAcquireProgress.ims_hitc C r )a� Prompt the user to change the inserted removable media. The parameter 'media' decribes the name of the media type that should be changed, whereas the parameter 'drive' should be the identifying name of the drive whose media should be changed. This method should not return until the user has confirmed to the user interface that the media change is complete. It must return True if the user confirms the media change, or False to cancel it. Fr )r �media�driver r r �media_changeJ s zAcquireProgress.media_changec C r )a Periodically invoked while the Acquire process is underway. This method gets invoked while the Acquire progress given by the parameter 'owner' is underway. It should display information about the current state. This function returns a boolean value indicating whether the acquisition should be continued (True) or cancelled (False). Tr )r �ownerr r r �pulseX s zAcquireProgress.pulsec C s4 d| _ d| _d| _d| _d| _d| _d| _d| _dS )z0Invoked when the Acquire process starts running.r r N)� current_bytes�current_cps� current_items�elapsed_time� fetched_bytes� last_bytes�total_bytes�total_items�r r r r �starte s zAcquireProgress.startc C r )z/Invoked when the Acquire process stops running.Nr r"