
    ~ gf                          S r SrSSKrSSKrSSKrSSKJr  SSKJr  Sr	Sr
\R                  " \
\	5        S r\r " S	 S
5      rg)zu
This module houses the i18n setup and message function. The default is to use
gettext to internationalize messages.
z4.9.1    N)ArgumentParser)SosListOptionz/usr/share/localesosc                 8    [         R                  " [        U 5      $ N)gettextdgettextgettext_app)msgs    ./usr/lib/python3/dist-packages/sos/__init__.py_defaultr      s    K--    c                   0    \ rS rSrSrS rS rS rS rSr	g)	SoS&   a>  Main 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                    Xl         SS KnSS KnSS KnSS KnUR
                  R                  S/4UR                  R                  SS/4UR                  R                  / 4UR                  R                  / 4S.U l         SS KnUR                  R                   S/4U R                  S'   S
nU R                  R1                  5        HH  u  pVUS   nUR3                  SU5        SR5                  U5      nUS   R6                  n	USUS U	 S3-  nMJ     Sn
X-   n
Sn[9        XS9U l        U R:                  R=                  SS[>        5        U R:                  RA                  SSSS9U l!        SU RB                  l"        U R                  R1                  5        Hz  u  pU RB                  RG                  UUS   SU 3S9nSU S3Ul$        UR=                  SS[>        5        U RK                  U5        US   RM                  US9  URO                  US9  M|     U R:                  RQ                  U R                   5      U l)        U RU                  5         g ! ["         a  nSS KnS['        UR(                  5      ;   a+  UR*                  R,                  / 4U R                  S'    S nAGNS	['        UR(                  5      ;   a+  UR*                  R.                  / 4U R                  S'    S nAGN9e S nAff = f)Nr   repcleanermask)reportcleanhelpupload	collectorcollectzsos.collectorpexpect    z, 	z<30
z6%(prog)s <component> [options]

Available components:
z1See `sos <component> --help` for more information)usageepilogactionextend	componentzsos component to run)destmetavarr   Tzsos )aliasesprogz
 [options])parser)r%   )+cmdline
sos.reportsos.cleanersos.help
sos.uploadr   	SoSReportr   
SoSCleanerr   	SoSHelperr   	SoSUpload_componentssos.collectorr   SoSCollectorModuleNotFoundErrorsos.missingstrr   missingMissingCollectMissingPexpectitemsinsertjoindescr   r*   registerr   add_subparsers
subparsersrequired
add_parserr!   _add_common_optionsadd_parser_optionsset_defaults
parse_argsargs_init_component)selfrJ   r   err_com_stringcomvaluer(   _comr@   usage_stringr"   comp_com_subparsers                 r   __init__SoS.__init__/   s    	zz++eW5kk,,y&.ABXX'',zz++R0	
	 +.==+E+E,7=+:DY' **002JCAhGNN1c"99W%D8==Dbc
4&34K 32#1D$<GXx?++44' 5 

 $(   ++113KD!__77aD6] 8 N
 &*$z#:N ##HhF$$^4!H''~'>''$'7 4 KK**4<<8	_ # 
	#cgg,./2{{/I/I2.N  +c#''l*/2{{/I/I2.N  + 
	s%   ?*I 
K(AK#>K#"K##K(c           
         UR                  S5      nUR                  SSSSS9  UR                  S[        SS	S
SS9  UR                  SSSSS9  UR                  SSSSSSS9  UR                  SSSSSSS9  UR                  SSSSSS9  UR                  SSSS S![        S"S#9  UR                  S$S%S&S'S(S)S9  UR                  S*S+S,/ S-QS.S/9  UR	                  5       nUR                  S0SSS1S9  UR                  S2S3S49  UR                  S5S6S49  g)7z@Adds the options shared across components to the parser
        zGlobal Optionsz--batchF
store_truezDo not prompt interactively)defaultr#   r   z--config-filestoreconfig_filez/etc/sos/sos.confz$specify alternate configuration file)typer#   r&   rY   r   z--debugdebugz6enable interactive debugging using the python debugger)r#   r&   r   z-qz--quietquietzonly print fatal errors)r#   r&   rY   r   z-sz	--sysrootsysrootNz!system rootdir path (default='/')z	--tmp-dirtmp_dirz%specify alternate temporary directoryz-tz	--threadsthreads   zNumber of threads to use)r#   r&   rY   r\   r   z-vz	--verbosecount	verbosityr   zincrease verbosityz-zz--compression-typecompression_type)autogzipxzzcompression technology to use)r&   choicesr   z	--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)r   z--encrypt-passz$Encrypt the archive using a password)add_argument_groupadd_argumentr9   intadd_mutually_exclusive_group)rL   r*   
global_grpencrypt_grps       r   rF   SoS._add_common_optionsx   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 	! 	Nr   c                    U R                   R                  nXR                  ;  a  [        SU S35         U R                  U   S   nUR                  (       a$  [
        R                  " 5       S:X  d  [        S5      eU" U R                  U R                   U R                  5      U l
        g! [         aN  n[        SU SU 35        U R                   R                  (       a  Ue[        R                  " S5         SnAgSnAff = f)	z^Determine which component has been requested by the user, and then
initialize that component.
zUnknown subcommand 'z' specifiedr   z*Component must be run with root privilegeszCould not initialize 'z': r   N)rJ   r%   r4   printroot_requiredosgetuid	Exceptionr*   r+   
_componentr]   sysexit)rL   rQ   _to_loadrM   s       r   rK   SoS._init_component   s     yy""'''(k:;
	''-a0H%%biikQ.> LMM&t{{DIIt||LDO 	*4&C59:yy	HHQKK		s   A4B+ +
D5AC>>Dc                 8    U R                   R                  5         g r   )rw   execute)rL   s    r   r}   SoS.execute   s    !r   )rw   r4   rJ   r+   r*   rC   N)
__name__
__module____qualname____firstlineno____doc__rU   rF   rK   r}   __static_attributes__ r   r   r   r   &   s    GR-N^&"r   r   )r   __version__rt   rx   r   argparser   sos.optionsr   gettext_dirr
   bindtextdomainr   _sosr   r   r   r   <module>r      sR     	 
  # %!   {K 0. U" U"r   