| Server IP : 3.7.136.76 / Your IP : 216.73.216.142 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-39-148 7.0.0-1010-aws #10~24.04.1-Ubuntu SMP PREEMPT Mon Jul 27 17:41:33 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /snap/core22/2955/usr/share/subiquity/subiquitycore/__pycache__/ |
Upload File : |
o
K��^� � @ sR d dl Z d dlZd dlZd dlZG dd� dej�Zd aG dd� d�Zd dd�ZdS )
� Nc @ s$ e Zd Ze�� Ze�� Ze�� ZdS )�StatusN)�__name__�
__module__�__qualname__�enum�auto�SUCCESS�FAIL�WARN� r r �-/usr/share/subiquity/subiquitycore/context.pyr s r c @ st e Zd ZdZddd�Zedd� �Zddd �Zd
d� Zddd
�Z de
jfdd�Zdd� Z
dd� Zdd� Zddd�ZdS )�Contexta� Class to report when things start and finish.
The expected way to use this is something like:
with somecontext.child("operation"):
await long_running_operation()
but you can also call .enter() and .exit() if use as a context
manager isn't possible.
start and finish events are reported via the report_start_event and
report_finish_event methods on app.
You can override the message shown on exit by passing it to the .exit
method or by assigning to description:
with somecontext.child("operation") as context:
result = await long_running_operation()
context.description = "result was {}".format(result)
Nc C sH t | _t d7 a || _|| _|| _|| _|| _|d u r|}|| _i | _d S )N� ) �
context_id�id�app�name�description�parent�level�
childlevel�data)�selfr r r r r r r r r �__init__4 s
zContext.__init__c C s | ||j dd d�S )N� �INFO)�project)�clsr r r r �newB s zContext.newr c C s&