%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core20/2599/usr/share/subiquity/console_conf/cmd/__pycache__/
Upload File :
Create Path :
Current File : //snap/core20/2599/usr/share/subiquity/console_conf/cmd/__pycache__/tui.cpython-38.pyc

U

K��^��@s�ddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZGdd�dej�Z
dd�Zd	ad
d�Zdd
�Zedkr�e�e��dS)�N)�setup_logger)�__version__)�ConsoleConf�RecoveryChooserc@seZdZddd�ZdS)�ClickActionNcCs|j�dt|�d�dS)Nzc(�))�scripts�append�repr)�self�parser�	namespace�valuesZ
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�|jddddd�|jdddgd�|jddddgdd�|jddtdd �|�d!�|jd"dd#d$d�|�|�S)%Nz:console-conf - Pre-Ownership Configuration for Ubuntu Corezconsole-conf)Zdescription�progz	--dry-run�
store_true�dry_runz)menu-only, do not call installer function)�action�dest�helpz--serialZ
run_on_serialz&Run the installer over serial console.z--ascii�asciiz Run the installer in ascii mode.z--machine-configZCONFIGZmachine_configz Don't Probe. Use probe data file)�metavarrrz	--screensr	Zscreens)rr�defaultz--scriptZSCRIPTrz>Execute SCRIPT in a namespace containing view helpers and "ui")rrrrrz--clickZPATz+Synthesize a click on a button matching PAT)rrrz	--answersz--recovery-chooser-mode�chooser_systemszXRun as a recovery chooser interacting with the calling process over stdin/stdout streams)�argparse�ArgumentParser�add_argumentr�
parse_args)�argvrrrr�
parse_optionssJ�����
�
�
�
�r$z/var/log/console-conf/cCs�ttjdd��}|jrdattd�t�d�}|�d�	t
��|�d�	tj��|jrtttj
�\}}t|||�}nt|�}|��dS)N�z
.subiquity)�dirZconsole_confzStarting console-conf v{}zArguments passed: {})r$�sysr#r�LOGDIRr�loggingZ	getLogger�info�format�VERSIONr�restore_std_streams_from�stderrrr�run)ZoptsZlogger�
chooser_input�chooser_outputZ	interfacerrr�mainBs

r2cCs<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�filenor'�stdin�stdout�open)Z	from_fileZttyr0r1rrrr-Xs
r-�__main__)rr'r5r)Zsubiquitycore.logrZ
subiquitycorerr,Zconsole_conf.corerrZActionrr$r(r2r-r�exitrrrr�<module>s!


Zerion Mini Shell 1.0