%PDF- %PDF-
Mini Shell

Mini Shell

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

o

K��^��@s�ddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZGdd�dej�Z
dd�Zd	ad
d�Zdd
�ZedkrGe�e��dSdS)�N)�setup_logger)�__version__)�ConsoleConf�RecoveryChooserc@seZdZddd�ZdS)�ClickActionNcCs|j�dt|�d�dS)Nzc(�))�scripts�append�repr)�self�parser�	namespace�values�
option_string�r�,/usr/share/subiquity/console_conf/cmd/tui.py�__call__szClickAction.__call__)N)�__name__�
__module__�__qualname__rrrrrrsrcCs�tjddd�}|jddddd�|jd	dd
dd�|jddd
dd�|jdddt��dd�|jdddgd�|jddddgdd�|jddtdd �|�d!�|jd"dd#d$d�|jd%d&d'd(d)d*�|�|�S)+Nz:console-conf - Pre-Ownership Configuration for Ubuntu Corezconsole-conf)�description�progz	--dry-run�
store_true�dry_runz)menu-only, do not call installer function)�action�dest�helpz--serial�
run_on_serialz&Run the installer over serial console.z--ascii�asciiz Run the installer in ascii mode.z--machine-config�CONFIG�machine_configz Don't Probe. Use probe data file)�metavarr�typerz	--screensr	�screens)rr�defaultz--script�SCRIPTrz>Execute SCRIPT in a namespace containing view helpers and "ui")r!rrr$rz--click�PATz+Synthesize a click on a button matching PAT)r!rrz	--answersz--recovery-chooser-mode�chooser_systemszXRun as a recovery chooser interacting with the calling process over stdin/stdout streamsz
--output-base�store�output_basez
.subiquityz#in dryrun, control basedir of files)rrr$r)�argparse�ArgumentParser�add_argument�FileTyper�
parse_args)�argvrrrr�
parse_optionssR�����
�
�
�
�
�
r0z/var/log/console-conf/cCs�ttjdd��}|jr|jattd�t�d�}|�	d�
t��|�	d�
tj��|jr;t
tj�\}}t|||�}nt|�}|��dS)N�)�dir�console_confzStarting console-conf v{}zArguments passed: {})r0�sysr/rr)�LOGDIRr�logging�	getLogger�info�format�VERSIONr'�restore_std_streams_from�stderrrr�run)�opts�logger�
chooser_input�chooser_output�	interfacerrr�mainFs

rCcCs<t�|���}tjtj}}t|d�t_t|d�t_||fS)z�
    Attempt to restore the original sys.std{in,out} streams by inspecting the
    tty that stderr is hooked up to. Returns the chooser input/output streams.
    �r�w)�os�ttyname�filenor4�stdin�stdout�open)�	from_file�ttyr@rArrrr;\s
r;�__main__)r*r4rFr6�subiquitycore.logr�
subiquitycorerr:�console_conf.corerr�Actionrr0r5rCr;r�exitrrrr�<module>s%
�

Zerion Mini Shell 1.0