%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core22/current/usr/share/subiquity/subiquitycore/__pycache__/
Upload File :
Create Path :
Current File : //snap/core22/current/usr/share/subiquity/subiquitycore/__pycache__/core.cpython-310.pyc

o

K��^��@s`ddlZddlZddlZddlZddlmZddlmZddlm	Z	e�
d�ZGdd�d�ZdS)�N)�Context)�
ControllerSet)�
MessageHubzsubiquitycore.corec@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�ApplicationcCs�d|_d|_|jrtj�dd��d�|_||_|j|_d|_	|jr%|j
|_	tj�|j	d|j�|_
tj|�d�dd	�ttj�d
d��|_tj�|�d��|_t�|_t��|_|j�|j�|�|j�t�|�|_dS)
N��SUBIQUITY_DEBUG��,�/�run�statesT)�exist_ok�SUBIQUITY_REPLAY_TIMESCALE�1�updating) �_exc�debug_flags�dry_run�os�environ�get�split�opts�project�root�output_base�path�join�	state_dir�makedirs�
state_path�float�scale_factor�exists�updatedr�hub�asyncio�get_event_loop�aio_loop�set_exception_handler�_exception_handler�load_controllers�controllersr�new�context)�selfrrr�*/usr/share/subiquity/subiquitycore/core.py�__init__-s(	�
zApplication.__init__cCst|j||fd�|_dS)zh Load the corresponding list of controllers

        Those will need to be restarted if already started )�	init_argsN)r�controllers_modr,)r/r,rrr0r+Ms�zApplication.load_controllerscCs.|�d�}|r|��||_dS|�|�dS)N�	exception)r�stopr�default_exception_handler)r/�loopr.�excrrr0r*Us


zApplication._exception_handlercGstjj|jg|�R�S�N)rrrr)r/�partsrrr0r ]szApplication.state_pathcCs^|jj}|dur
dSt|�d|j�d��}t�|��|�Wd�dS1s(wYdS)Nr�w)r,�cur�openr �name�json�dump�	serialize)r/r<�fprrr0�
save_state`s"�zApplication.save_statecCs,t�|���}tt|j�}|�|d|�dS)Nz	start: %s)�logging�	getLogger�	full_name�getattr�level�log)r/r.�descriptionrIrHrrr0�report_start_eventgszApplication.report_start_eventcCs0t�|���}tt|j�}|�|d||j�dS)Nz
finish: %s %s)rDrErFrGrHrIr>)r/r.rJ�statusrIrHrrr0�report_finish_eventlszApplication.report_finish_eventcCs|j��dSr9)r(r5�r/rrr0�exitsszApplication.exitcCs.t�d�|jjD]}|��q	t�d�dS)Nzstarting controllerszcontrollers started)rI�debugr,�	instances�start)r/�
controllerrrr0�start_controllersvs

zApplication.start_controllersc�s�|j��|��dSr9)r,�load_allrTrNrrr0rR|s�
zApplication.startcCs@|��|_|j�|���|j��|jr|jd}|_|�dSr9)�
make_model�
base_modelr(�create_taskrR�run_foreverr)r/r8rrr0r�s

�zApplication.runN)�__name__�
__module__�__qualname__r1r+r*r rCrKrMrOrTrRrrrrr0rs r)
r&r?rDr�subiquitycore.contextr�subiquitycore.controllersetr�subiquitycore.pubsubrrErIrrrrr0�<module>s


Zerion Mini Shell 1.0