HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3.9/site-packages/sos/__pycache__/__init__.cpython-39.pyc
a

^��c� �@s�dZdZddlZddlZddlmZddlmZddlZdZ	dZ
e�e
e	�dd	�ZeZ
zeWneyveZYn0Gd
d�d�ZdS)zu
This module houses the i18n setup and message function. The default is to use
gettext to internationalize messages.
z4.5.1�N)�ArgumentParser)�
SosListOptionz/usr/share/locale�soscCst�t|�S�N)�gettext�dgettext�gettext_app)�msg�r
�0/usr/lib/python3.9/site-packages/sos/__init__.py�_defaultsrc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�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

Cs||_ddl}ddl}ddl}|jjdgf|jjddgf|jj	gfd�|_
z ddl}|jj
dgf|j
d<Wnjty�}zRddl}d|jvr�|jjgf|j
d<n d	|jvr�|jjgf|j
d<n�WYd}~n
d}~00d
}|j
D]J}|j
|d}|�d|�d�|�}|j
|dj}|d
j||d�7}q�d}	|	|}	d}
t|	|
d�|_|j�ddt�|jjdddd�|_d|j_|j
D]j}|jj||j
|dd|d�}d||_ |�ddt�|�!|�|j
|dj"|d�|j#|d��q||j�$|j�|_%|�&�dS)NrZrep�cleaner�mask)�reportZclean�help�	collectorZcollectz
sos.collectorZpexpect��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)'�cmdlineZ
sos.reportZsos.cleanerZsos.helprZ	SoSReportrZ
SoSCleanerrZ	SoSHelper�_componentsZ
sos.collectorrZSoSCollector�ModuleNotFoundErrorZsos.missingr	�missingZMissingCollectZMissingPexpect�insert�joinr�formatrr �registerr�add_subparsersZ
subparsers�required�
add_parserr�_add_common_optionsZadd_parser_options�set_defaults�
parse_args�args�_init_component)
�selfr/r�errZ_com_stringrr�_comrZusage_stringr�compZ_com_subparserr
r
r�__init__5sj
��



��
�

zSoS.__init__c	Cs|�d�}|jddddd�|jdtdd	d
dd�|jd
dddd�|jddddddd�|jddddddd�|jdddddd�|jdddd d!td"d#�|jd$d%d&d'd(d)d�|jd*d+d,gd-�d.d/�|��}|jd0ddd1d�|jd2d3d4�|jd5d6d4�dS)7z@Adds the options shared across components to the parser
        zGlobal Optionsz--batchF�
store_truezDo not prompt interactively)�defaultrrz
--config-file�storeZconfig_filez/etc/sos/sos.confz$specify alternate configuration file)�typerrr7rz--debug�debugz6enable interactive debugging using the python debugger)rrrz-qz--quiet�quietzonly print fatal errors)rrr7rz-sz	--sysrootZsysrootNz!system rootdir path (default='/')z	--tmp-dirZtmp_dirz%specify alternate temporary directoryz-tz	--threads�threads�zNumber of threads to use)rrr7r9rz-vz	--verbose�count�	verbosityrzincrease verbosityz-zz--compression-typeZcompression_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)r1r Z
global_grpZencrypt_grpr
r
rr,~s`

�
�
�
�
�
�
�
�����zSoS._add_common_optionsc
Cs�|jj}||j��vr"td|�z@|j|d}|jrLt��dksLtd��||j	|j|j
�|_WnJty�}z2td||f�|jjr�|�t
�d�WYd}~n
d}~00dS)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 '%s': %srN)r/rr"�keys�printZ
root_required�os�getuid�	Exceptionr r!�
_componentr:�sys�exit)r1r3Z_to_loadr2r
r
rr0�szSoS._init_componentcCs|j��dSr)rN�execute)r1r
r
rrQ�szSoS.executeN)�__name__�
__module__�__qualname__�__doc__r5r,r0rQr
r
r
rr
,s
I/r
)rU�__version__rKrO�argparserZsos.optionsrrZgettext_dirr�bindtextdomainrZ_sosr#�	NameError�ImportErrorr
r
r
r
r�<module>
s