File: //lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradeViewNonInteractive.cpython-310.pyc
o
\�d&6 � @ sR d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZ d dlm
Z
mZ d dl mZmZ ddlmZmZmZ ddlmZ ddlmZ G dd � d e�ZG d
d� de�ZG dd
� d
e�Zedkr�e� Ze� Ze� Ze� dd� e �!� Z"ej#dd� D ]Z$e"e$ �%� q�e"�&ee� e�'d� e�(d � dS dS )� N)�NoSectionError�
NoOptionError)�PIPE�Popen� )�DistUpgradeView�InstallProgress�AcquireProgress)�get)�DistUpgradeConfigc @ s e Zd Zdd� ZdS )�NonInteractiveAcquireProgressc C s\ t �| ||||� |tjkr*td|| jt�t| j��f � t j
�� r,t j
�� d S d S d S )Nzfetched %s (%.2f/100) at %sb/s)
r �
update_status�apt_pkg� STAT_DONE�print�percent�size_to_str�int�current_cps�sys�stdout�isatty�flush)�self�uri�descr�
shortDescr�status� r �K/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeViewNonInteractive.pyr
, s
�
�z+NonInteractiveAcquireProgress.update_statusN)�__name__�
__module__�__qualname__r
r r r r r + s r c @ sP e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� ZdS )�NonInteractiveInstallProgressz�
Non-interactive version of the install progress class
This ensures that conffile prompts are handled and that
hanging scripts are killed after a (long) timeout via ctrl-c
c C s� t �| � t�d� dtjvrdtjd<