%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/__pycache__/__init__.cpython-312.pyc

�

i��d� ���dZdZddlZddlZddlmZddlmZddlZdZ	dZ
eje
e	�d�ZeZ
	eGd	�d
�Zy#e$reZY�wxYw)zu
This module houses the i18n setup and message function. The default is to use
gettext to internationalize messages.
z4.5.6�N)�ArgumentParser)�
SosListOptionz/usr/share/locale�sosc�6�tjt|�S�N)�gettext�dgettext�gettext_app)�msgs �./usr/lib/python3/dist-packages/sos/__init__.py�_defaultr
s�����K��-�-�c�(�eZdZdZd�Zd�Zd�Zd�Zy)�SoSaRMain entrypoint for sos from the command line

    Upon intialization, this class loads the basic option parser which will
    include the options shared by support components/subcommands. This is also
    where all subcommands present in the local installation are discovered,
    loaded, and if a matching one is found, intialized.
    c��||_ddl}ddl}ddl}|jj
dgf|jjddgf|jjgfd�|_
	ddl}|jjdgf|jd<d
}|jD]i}|j|d}|j)d|�dj+|�}|j|dj,}|d
j/||��z
}�kd}	|	|z}	d}
t1|	|
��|_|j2j5ddt6�|j2j9ddd��|_d|j:_|jD]�}|j:j?||j|dd|z��}d|z|_ |j5ddt6�|jC|�|j|djE|��|jG|����|j2jI|j�|_%|jM�y#t$rx}ddl}d|j vr&|j"j$gf|jd<n5d	|j vr&|j"j&gf|jd<n�Yd}~��Id}~wwxYw)Nr�rep�cleaner�mask)�report�clean�help�	collector�collectz
sos.collector�pexpect��z, z	{com:<30}{desc}
)�com�descz6%(prog)s <component> [options]

Available components:
z1See `sos <component> --help` for more information)�usage�epilog�action�extend�	componentzsos component to run)�dest�metavarrTzsos %s)�aliases�progzsos %s [options])�parser)r#)'�cmdline�
sos.report�sos.cleaner�sos.helpr�	SoSReportr�
SoSCleanerr�	SoSHelper�_components�
sos.collectorr�SoSCollector�ModuleNotFoundError�sos.missingr�missing�MissingCollect�MissingPexpect�insert�joinr�formatrr(�registerr�add_subparsers�
subparsers�required�
add_parserr�_add_common_options�add_parser_options�set_defaults�
parse_args�args�_init_component)
�selfrDr�err�_com_stringrr&�_comr�usage_stringr �comp�_com_subparsers
             r�__init__zSoS.__init__5s������	����z�z�+�+�e�W�5��k�k�,�,�y�&�.A�B��X�X�'�'��,�
���	� �+.�=�=�+E�+E�,7�=�+:�D���Y�'����#�#�	�C��&�&�s�+�A�.�G��N�N�1�c�"��9�9�W�%�D��#�#�C�(��+�0�0�D��%�,�,��D�,�A�
�K�	�2��#�k�1��E��$�<��G��������X�x��?��+�+�4�4���'�5�
���
$(���� ��$�$�
	8�D�!�_�_�7�7���(�(��.�q�1���_�8��N�
$6��#<�N� ��#�#�H�h�
�F��$�$�^�4����T�"�1�%�8�8��8�O��'�'�$�'�7�
	8��K�K�*�*�4�<�<�8��	������c#�
	���#�'�'�)�/2�{�{�/I�/I�2�.N�� � ��+��c�g�g�%�/2�{�{�/I�/I�2�.N�� � ��+����
	�s�%*I�	K�%A-K�Kc	�d�|jd�}|jdddd��|jdtdd	d
d��|jd
ddd��|jdddddd��|jdddddd��|jddddd��|jdddd d!td"�#�|jd$d%d&d'd(d)��|jd*d+d,gd-�d.�/�|j	�}|jd0ddd1��|jd2d3�4�|jd5d6�4�y)7z@Adds the options shared across components to the parser
        zGlobal Optionsz--batchF�
store_truezDo not prompt interactively)�defaultr!rz
--config-file�store�config_filez/etc/sos/sos.confz$specify alternate configuration file)�typer!r$rPrz--debug�debugz6enable interactive debugging using the python debugger)r!r$rz-qz--quiet�quietzonly print fatal errors)r!r$rPrz-sz	--sysroot�sysrootNz!system rootdir path (default='/')z	--tmp-dir�tmp_dirz%specify alternate temporary directoryz-tz	--threads�threads�zNumber of threads to use)r!r$rPrSrz-vz	--verbose�count�	verbosityrzincrease verbosityz-zz--compression-type�compression_type)�auto�gzip�xzzcompression technology to use)r$�choicesrz	--encryptz_Encrypt the archive, either prompting for a password/key or referencing an environment variablez
--encrypt-keyz(Encrypt the archive using a GPG key-pair)rz--encrypt-passz$Encrypt the archive using a password)�add_argument_group�add_argument�str�int�add_mutually_exclusive_group)rFr(�
global_grp�encrypt_grps    rr@zSoS._add_common_options~s����.�.�/?�@�
����	�5��%B�	 �	D�����c�'�%2�(;�%K�	 �	M�	���	�,�W�&7�	 �	8�	����i��%,�e�%>�	 �	@�	����k�'�%.��%H�	 �	J�	����G�)�(,�%L�	 �	N�	����k�'�%.���%?�	 �	A�	����k�'�%0�!�%9�	 �	;�	����&:�%7�(>�%D�	 �	F�!�=�=�?��� � ��e�(4�(A�	!�	C�
	� � ��'1�	!�	2�	� � �!1�&L�	!�	Nrc��|jj}||jj�vrt	d|z�	|j|d}|j
r"t
j�dk(std��||j|j|j�|_y#t$rH}t	d|�d|���|jjr|�tjd�Yd}~yd}~wwxYw)znDetermine which component has been requested by the user, and then
        initialize that component.
        z!Unknown subcommand '%s' specifiedrz*Component must be run with root privilegeszCould not initialize 'z': rN)rDr#r0�keys�print�
root_required�os�getuid�	Exceptionr(r)�
_componentrT�sys�exit)rFrI�_to_loadrGs    rrEzSoS._init_component�s����y�y�"�"���t�'�'�,�,�.�.��5��<�=�
	��'�'��-�a�0�H��%�%�b�i�i�k�Q�.>�� L�M�M�&�t�{�{�D�I�I�t�|�|�L�D�O���	��T�3�?�@��y�y����	��H�H�Q�K�K��		�s�A-B0�0	D�9>C<�<Dc�8�|jj�yr)ro�execute)rFs rrtzSoS.execute�s�������!rN)�__name__�
__module__�__qualname__�__doc__rMr@rErt�rrrr,s���G�R-N�^�&"rr)rx�__version__rlrp�argparser�sos.optionsrr�gettext_dirr
�bindtextdomainr
�_sosr3�	NameError�ImportErrorrryrr�<module>r�ss�����	�
�#�%��!��������{�K�0�.���&��
U"�U"��	�&�%��&�s�A�A�A

Zerion Mini Shell 1.0