+
    Û1j´3  ã                   óh   € ^ RI Ht ^ RIHt R tR t ! R R4      t ! R R]4      t ! R	 R
4      tR# )é    )ÚAction)ÚConfigParserc                óH   € \        V 4      pV\        J ;'       g	    V\        J # )z@Return true if val is an instance of a known sequence type.
    )ÚtypeÚlistÚtuple)ÚvalÚval_types   & Ú-/usr/lib/python3/dist-packages/sos/options.pyÚ_is_seqr      s%   € ô �C‹y€HØ”tÐ×0Ð0˜x¬5Ð0Ð0ó    c                 óJ   € V P                  4       pVR9   d   R# VR9   d   R# R# )ÚtrueTFN)r   ÚonÚyes)ÚfalseÚoffÚno)Úlower)r	   Ú_vals   & r   Ústr_to_boolr      s(   € Ø�9‰9‹;€DØÐ$Ô$ÙØÐ%Ô%ÙÙr   c                   óš   a € ] tR t^t o R tR tRR ltR tR t/ 3R lt	]
/ 3R l4       t]
R 4       tR	 tR
 tRR ltRR ltR tRtV tR# )Ú
SoSOptionsc                óÞ  € R  p\        W!4      '       dÙ   \        W!4      p\        W4      pV! V4      '       d   V! V4      '       d2   V'       g*   WP                  9  d   \        V4      '       d	   V'       dO   \	        WV4       V'       d   V P                  P                  V4       R# V P                  P                  V4       R# \        V4      '       d   \	        WWg,           4       R# R# R# )c                 ó$   € V R 8H  ;'       g    V RJ # )Ú N© )r	   s   &r   Ú_unsetÚ%SoSOptions._merge_opt.<locals>._unset    s   € Ø˜2‘I×,Ð, ¨ Ð-r   N)ÚhasattrÚgetattrÚ_nondefaultr   ÚsetattrÚdiscardÚadd)ÚselfÚoptÚsrcÚ
is_defaultÚ
prefer_newr   ÚnewvalueÚoldvalues   &&&&&   r   Ú
_merge_optÚSoSOptions._merge_opt   s²   € ò	.ô �3×ÒÜ˜sÓ(ˆHÜ˜tÓ)ˆHñ �x× Ò ©°×)9Ò)9ßØ×,Ñ,Ô,´w¸x×7HÒ7Hßä˜ 8Ô,ßØ×$Ñ$×,Ñ,¨SÖ1à×$Ñ$×(Ñ(¨Ö-Ü˜×"Ò"ä˜ 8Õ#6Ö7ñ #ñ% r   c                ó’   € \        V\        4      '       g   \        V4      pV P                   F  pV P	                  WAW#4       K  	  R # ©N)Ú
isinstanceÚdictÚvarsÚ	arg_namesr-   )r&   r(   r)   r*   Úargs   &&&& r   Ú_merge_optsÚSoSOptions._merge_opts9   s4   € Ü˜#œt×$Ò$Ü�s“)ˆCØ—>”>ˆCØ�O‰O˜C jÖ=ó "r   c                ó  € TpRpV P                    F  pWWV,           V,           ,          pK  	  VP                  V4       V P                    Uu. uF  p\        W4      NK  	  ppV'       g5   V U	u. uF'  p	\        V	4      '       d   RP	                  V	4      MT	NK)  	  pp	M-V U	u. uF!  p	\        V	\        4      '       d   RV	 R2MT	NK#  	  pp	V\        V4      ,          P                  V4      V,           # u upi u up	i u up	i )a  Format a SoSOptions object as a human or machine readable string.

:param quote: quote option values
:param sep: list separator string
:param prefix: arbitrary prefix string
:param suffix: arbitrary suffix string
:param literal: print values as Python literals
z=%sÚ,Ú')r4   Ústripr!   r   Újoinr1   Ústrr   )
r&   ÚquoteÚsepÚprefixÚsuffixÚargsÚarg_fmtr5   ÚvalsÚvs
   &&&&&     r   Ú__strÚSoSOptions.__str?   sä   € ð ˆØˆØ—>”>ˆCØ˜'•M CÕ'Õ'ŠDñ "à�
‰
�3Œà.2¯nªnÓ=©n s”˜Ö"©nˆÐ=ßá>BÓC¹d¸¤7¨1§:¢:�C—H‘H˜Q”K°1Ò4¹dˆDÐCˆDñ DHÓHÁ4¸a¤
¨1¬c× 2Ò 2�a˜�s˜!‘H¸Ò9Á4ˆDÐHà”u˜T“{Õ"×)Ñ)¨#Ó.°Õ7Ð7ùò >ùò Dùò Is   ÁC4Á/-C9Â#'C>c                ó"   € V P                  4       # r0   ©Ú_SoSOptions__str©r&   s   &r   Ú__str__ÚSoSOptions.__str__X   s   € Ø�z‰z‹|Ðr   c                ó,   € V P                  R RRRR7      # )Tz, zSoSOptions(Ú))r>   r?   r@   rA   rI   rK   s   &r   Ú__repr__ÚSoSOptions.__repr__[   s!   € Ø�z‰z ¨$°}Ø!$ð ó &ð 	&r   c                óL  € Wn         \        VP                  4       4      V n        \	        4       V n        V P                    F   p\        WV P                   V,          4       K"  	  VP                  4        F,  w  r4V P                  P                  V4       \        WV4       K.  	  R# )a˜  Initialise a new ``SoSOptions`` object from keyword arguments.

Initialises the new object with values taken from keyword
arguments matching the names of ``SoSOptions`` attributes.

A ``ValueError`` is raised is any of the supplied keyword
arguments does not correspond to a known ``SoSOptions`
attribute name.

:param *kwargs: a list of ``SoSOptions`` keyword args.
:returns: the new ``SoSOptions`` object.
N)	Úarg_defaultsr   Úkeysr4   Úsetr"   r#   ÚitemsÚappend)r&   rS   Úkwargsr5   Úkwargs   &&,  r   Ú__init__ÚSoSOptions.__init___   s~   € ð )ÔÜ˜l×/Ñ/Ó1Ó2ˆŒÜ›5ˆÔà×$Ô$ˆCÜ�D˜t×0Ñ0°Õ5Ö6ñ %ð !Ÿ,™,ž.‰JˆCØ�N‰N×!Ñ! #Ô&Ü�D˜uÖ%ó )r   c                ó\   € \        R/ \        V4      BRV/B pVP                  VRR4       V# )zÓInitialise a new SoSOptions object from a ``Namespace``
obtained by parsing command line arguments.

:param args: parsed command line arguments
:returns: an initialised SoSOptions object
:returntype: SoSOptions
rS   TFr   )r   r3   r6   )ÚclsrB   rS   Úoptss   &&& r   Ú	from_argsÚSoSOptions.from_argsw   s1   € ô ÑBœD ›JÑB°\ÒBˆØ×Ñ˜˜t UÔ+Øˆr   c                óš   € RpRpW9   d   RV 2.# W9   d)   \        ^ \        V4      4       Uu. uF  pRV 2NK
  	  up# RV RV 2.# u upi )z»Convert a named option and optional value to command line
argument notation, correctly handling options that take
no value or that have special representations (e.g. verify
and verbose).
ú--Ú=)Ú
alloptionszallow-system-changeszall-logsÚbatchÚbuildÚdebugÚexperimentalzlist-pluginszlist-presetszlist-profilesz	no-reportzno-env-varsÚquietÚverify)Úverbose)ÚrangeÚint)r]   r'   r	   Úno_valueÚcountÚds   &&&   r   Ú_opt_to_argsÚSoSOptions._opt_to_args„   sk   € ð
ˆð
 ˆØŒ?Ø˜˜�J�<ÐØŒ<Ü(-¨a´°S³Ô(:Ó;Ñ(: 1�b˜˜“JÑ(:Ñ;Ð;Ø�S�E˜˜3˜%Ð Ð!Ð!ùò <s   ®Ac                óÜ  € \        V P                  V,          \        V4      4      '       d   V# \        V P                  V,          \        4      '       d   \        VP	                  R4      4      # \        V P                  V,          \
        4      '       d$   \        V4      pVf   \        RV RV R24      hV# \        V P                  V,          \        4      '       d   \        V4      # V# )an  Ensure that the value read from a config file is the proper type
for consumption by the component, as defined by arg_defaults.

Params:
    :param key:         The key in arg_defaults we need to match the
                        type of
    :param val:         The value to be converted to a particular type
    :param conf:        File values are being loaded from
r9   z
Value of 'z' in z# must be True or False or analagous)	r1   rS   r   r   ÚsplitÚboolr   Ú	Exceptionrm   )r&   Úkeyr	   Úconfs   &&&&r   Ú_convert_to_typeÚSoSOptions._convert_to_type—   sÈ   € ô �d×'Ñ'¨Õ,¬d°3«i×8Ò8ØˆJÜ�d×'Ñ'¨Õ,¬d×3Ò3Ü˜Ÿ	™	 #›Ó'Ð'Ü�d×'Ñ'¨Õ,¬d×3Ò3Ü˜cÓ"ˆCØŠ{ÜØ    U¨4¨&ð 1 ð  ó!ð !ð ˆJÜ�d×'Ñ'¨Õ,¬c×2Ò2Ü�s“8ˆOØˆ
r   c                ó¦  a a€ VV 3R lp\        4       p \        SRR7      ;_uu_ 4       pVP                  VS4       RRR4       T! RT4       T! Y$4       TP                  R4      '       d—   \        S R	4      '       dƒ   \        S R
4      '       do   TP                  R4       FW  w  rxTP                  R4      ^ ,          S P                  9   d   K.  S P                  P                  TR,           T,           4       KY  	  R# R# R# R#   + '       g   i     LÐ; i  \         d.   p\	        RS RTP
                  ^,           24        Rp?ELRp?ii ; i)zÚRead the provided config_file and update options from that.

Positional arguments:

    :param config_file:             Filepath to the config file
    :param component:               Which component (section) to load
c                 ó¶  <€ VP                  V 4      '       Ed@   \        VP                  V 4      4      pR VP                  4       9   d   \	        VP                  R 4      4      VR&   RRRRRR/p\        V4       FO  pRV9   d$   VP                  V4      W$P                  RR	4      &   WC9   g   K5  VP                  V4      W#V,          &   KQ  	  VP                  4        Fw  w  rE\        V\        4      '       d   VR
8w  d   VP                  RR4      pVSP                  9  d   \        RV RV  R24       KY  SP                  WES4      p\        SWE4       Ky  	  R# R# )rk   Ú	verbosityÚnameÚlabelÚplugin_optionÚplugoptsÚprofileÚprofilesÚ-Ú_ÚkeywordsÚ r   zUnknown option 'z' in section 'r:   N)Úhas_sectionr2   rV   rT   rm   Úpopr   Úreplacer1   r=   rS   Úprintry   r#   )ÚsectionÚconfigÚodictÚrename_optsrw   r	   Úconfig_filer&   s   &&    €€r   Ú_update_from_sectionÚ9SoSOptions.update_from_conf.<locals>._update_from_section¹   s8  ø€ Ø×!Ñ! '×*Ó*Ü˜VŸ\™\¨'Ó2Ó3�à §
¡
£Ô,Ü),¨U¯Y©Y°yÓ-AÓ)B�E˜+Ñ&ð
 ˜GØ# ZØ˜zð�ô
   ž;�CØ˜c”zØ7<·y±yÀ³~˜Ÿk™k¨#¨sÓ3Ñ4ØÖ)Ø27·)±)¸C³.˜¨#Õ.Ó/ñ	 'ð !&§¡¦‘H�Cô " #¤s×+Ò+°°zÔ0AØ!Ÿk™k¨#¨rÓ2˜Ø $×"3Ñ"3Ô3ô Ð 0°°°^ÀGÀ9ÈAÐNÔOÙ Ø×/Ñ/°¸+ÓF�CÜ˜D #Ö+ó !.ñ' +r   zutf-8)ÚencodingNz+WARNING: Unable to read configuration file z : ÚglobalÚplugin_optionsr�   Úskip_pluginsÚ.rc   )r   ÚopenÚ	read_fileÚOSErrorr‹   rB   rˆ   r    rV   rt   r–   r�   rW   )	r&   r�   Ú	componentr‘   r�   ÚfÚerw   r	   s	   ff&      r   Úupdate_from_confÚSoSOptions.update_from_conf°   s  ù€ ö 	,ôD “ˆð	Ü�k¨G×4Õ4¸Ø× Ñ   KÔ0÷ 5ñ 	˜X vÔ.Ù˜YÔ/Ø×ÑÐ.×/Ò/´G¸DÀ*×4MÒ4MÜ˜D .×1Ò1à"ŸL™LÐ)9Ö:‘�Ø—y‘y “~ aÕ(¨D×,=Ñ,=Ö=Ø—M‘M×(Ñ(¨¨s­°S­Ö9ó ;ñ 2ñ 5NÑ/÷ 5×4ûäô 	ÜØ=¸k¸]È#Ø—6‘6˜!•9�+ð÷ò ûð	ús3   •D ªD½D ÄD	ÄD ÄD ÄEÄ#"EÅEc                ó¨   € V P                    FA  p\        W4      '       g   K  \        W4      f   V'       d   K-  V P                  WARVR7       KC  	  R# )aT  Merge another set of ``SoSOptions`` into this object.

Merge two ``SoSOptions`` objects by setting unset or default
values to their value in the ``src`` object.

:param src: the ``SoSOptions`` object to copy from
:param is_default: ``True`` if new default values are to be set.
:param prefer_new: ``False`` if new default is not preferred.
NF)r*   )r4   r    r!   r-   )r&   r(   Úskip_defaultr*   r5   s   &&&& r   ÚmergeÚSoSOptions.mergeî   sA   € ð —>”>ˆCÜ˜3×$Ò$ÙÜ�sÓ Ò,·L±LØ—‘ ¨%¸J�ÖGó	 "r   c                óp   € / pV P                    F#  p\        W4      pV'       d
   VR9   d   RpWBV&   K%  	  V# )z’Return this ``SoSOptions`` option values as a dictionary of
argument name to value mappings.

:returns: a name:value dictionary of option values.
N©Ú
add_presetÚ
del_presetÚdescÚnote)r4   r!   )r&   Úpreset_filterrŽ   r5   Úvalues   &&   r   r2   ÚSoSOptions.dictþ   s@   € ð ˆØ—>”>ˆCÜ˜DÓ&ˆEçØÐFÔFØ �EØ�#‹Jñ "ð ˆr   c                óÜ   a a€ V 3R loV3R lpR p\        S P                  4       P                  4       R R7      pV UUu. uF  w  rEV! WE4      '       g   K  V! WE4      NK  	  upp# u uppi )zÅReturn command arguments for this object.

Return a list of the non-default options of this ``SoSOptions``
object in ``sos report`` command line argument notation:

    ``["--all-logs", "-vvv"]``

c                óÈ   <€ RpV'       d   W9   d   R# V R8X  d   V'       d   R# V SP                   9   d-   \        V4      \        SP                   V ,          4      8X  d   R# R# )z-Test for non-null option values.
            Fr�   T)ÚFalseÚNonez[]z""z''Ú0)rS   r=   )r~   r«   Únull_valuesr&   s   && €r   Ú	has_valueÚ%SoSOptions.to_args.<locals>.has_value  sS   ø€ ð CˆKß˜EÔ0ÙØ�zÔ!§eÙØ�t×(Ñ(Ô(Ü�u“:¤ T×%6Ñ%6°tÕ%<Ó!=Ô=Ù Ùr   c                óF   <€ V R9   d   R# V R9   d
   V^ 8X  d   R# S! W4      # )z7Filter out preset and null-valued options.
            FTr¥   )Úlog_sizeÚplugin_timeoutÚcmd_timeoutr   )r~   r«   r³   s   &&€r   Ú
filter_optÚ&SoSOptions.to_args.<locals>.filter_opt$  s/   ø€ ð ÐCÔCÙàÐDÔDØ˜A”:ÙÙ˜TÓ)Ð)r   c                ó>  € V P                  R4      '       d   R\        V4      R,          ,           pV# V P                  RR4      p \        V4      '       d   RP	                  V4      MTpVRJd	   V  RV 2pMT p\        V4      ^8”  d   RV,           pV# RV,           pV# )	zCConvert sos option notation to command line arguments.
            r}   r„   rE   r…   r9   Tr‡   rb   )Ú
startswithrm   rŠ   r   r<   Úlen)r~   r«   r5   r'   s   &&  r   ÚargifyÚ"SoSOptions.to_args.<locals>.argify/  s—   € ð �‰˜{×+Ò+ØœC ›J¨Õ,Õ,�Ø�
à—<‘<  SÓ)ˆDä'.¨u§~¢~�C—H‘H˜U”O¸5ˆEà˜DÓ Ø˜˜a ˜wÐ'‘à�ä # C£¨1¤�$˜•*ˆCØˆJð 36¸µ)ˆCØˆJr   c                 ó   € V ^ ,          # )r   r   )Úxs   &r   Ú<lambda>Ú$SoSOptions.to_args.<locals>.<lambda>C  s   € ¸aÀ¾dr   )rw   )Úsortedr2   rV   )r&   r¹   r¾   Ú	opt_itemsÚnrE   r³   s   f     @r   Úto_argsÚSoSOptions.to_args  sV   ù€ õ	õ		*ò	ô( ˜4Ÿ9™9›;×,Ñ,Ó.±NÔCˆ	Ù+4ÔI©9¡ !¹
À1×8H”‘�q–©9ÒIÐIùÓIs   ÁA(ÁA()r"   rS   r4   N)Fr‡   r   r   )TF)T)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r-   r6   rJ   rL   rP   rZ   Úclassmethodr_   rq   ry   rž   r¢   r2   rÇ   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      su   ø‡ € ò8ò4>ô8ò2ò&ð %'ô &ð0 Ø*,ó 
ó ð
ð ñ"ó ð"ò$ò2<:ô|Hô ÷ 6Jð 6Jr   r   c                   ó.   a € ] tR tRt o RtRR ltRtV tR# )ÚSosListOptioniG  z0Allow to specify comma delimited list of pluginsNc                óÔ   € \        VP                  R 4      4      p\        W P                  4      '       d   V\        W P                  4      ,          p\	        W P                  V4       R# )r9   N)r   rt   r!   Údestr#   )r&   ÚparserÚ	namespaceÚvaluesÚoption_stringrV   s   &&&&& r   Ú__call__ÚSosListOption.__call__K  sE   € Ü�V—\‘\ #Ó&Ó'ˆÜ�9Ÿi™i×(Ò(Ø”W˜Y¯	©	Ó2Õ2ˆEÜ�	Ÿ9™9 eÖ,r   r   r0   )rÉ   rÊ   rË   rÌ   Ú__doc__rÚ   rÎ   rÏ   rÐ   s   @r   rÓ   rÓ   G  s   ø‡ € á:÷-ò -r   rÓ   c                   ó.   a € ] tR tRt o RtRR ltRtV tR# )ÚClusterOptioniR  z6Used to store/manipulate options for cluster profiles.Nc                óB   € Wn         W n        W0n        W@n        WPn        R # r0   )r~   r«   Úopt_typeÚclusterÚdescription)r&   r~   r«   rà   rá   râ   s   &&&&&&r   rZ   ÚClusterOption.__init__U  s   € ØŒ	ØŒ
Ø ŒØŒØ&Ör   )rá   râ   r~   rà   r«   r0   )rÉ   rÊ   rË   rÌ   rÜ   rZ   rÎ   rÏ   rÐ   s   @r   rÞ   rÞ   R  s   ø‡ € Ù@÷'ò 'r   rÞ   N)	Úargparser   Úconfigparserr   r   r   r   rÓ   rÞ   r   r   r   Ú<module>ræ      s<   ðõ Ý %ò1ò÷gJñ gJôT	-�Fô -÷'ó 'r   