ó uÈÔec.@s†dZddlZddlZddlmZejrVddlmZmZm Z nddlmZmZm Z dZ dZ dZ ej e e ƒd„ZeZd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6g.Zid7d6d7d6d8d6d7d(6d9d56d7d46Zd:„Zd;efd<„ƒYZdS(=su This module houses the i18n setup and message function. The default is to use gettext to internationalize messages. iÿÿÿÿN(tArgumentParser(t ConfigParsert ParsingErrortErrors3.9s/usr/share/localetsoscCstjt|ƒS(N(tgettexttdgettextt gettext_app(tmsg((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt_default$st add_presett alloptionstallow_system_changestall_logstbatchtbuildtcase_idtchroottcompression_typet config_filetdesctdebugt del_presettdry_runt enablepluginst encrypt_keyt encrypt_passt experimentaltlabelt list_pluginst list_presetst list_profilestlog_sizet nopluginstnoreportt no_env_varst no_postproctnotet onlypluginstplugin_timeouttplugoptstpresettprofilestquiettsincetsysroottthreadsttmp_dirtuploadt upload_urltupload_directoryt upload_usert upload_passtupload_protocolt verbositytverifytautoiicCs"t|ƒ}|tkp!|tkS(s@Return true if val is an instance of a known sequence type. (ttypetlistttuple(tvaltval_type((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt_is_seqMs t SoSOptionscBs˜eZd„Zd„Zedddd„Zd„Zd„Zd„Ze d„ƒZ e d „ƒZ e e d „ƒZ e d „Zd „Zd „ZRS(c Cs×d„}t||ƒrÓt||ƒ}t||ƒ}||ƒrO||ƒ sq|sq||jkr­t|ƒ r­t|||ƒ|rš|jj|ƒqÐ|jj|ƒqÓt|ƒrÓt||||ƒqÓndS(NcSs|dkp|dkS(Nt(tNone(R<((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt_unsetWs(thasattrtgetattrt _nondefaultR>tsetattrtdiscardtadd(tselftopttsrct is_defaultRBtnewvaluetoldvalue((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt _merge_optVs  cCs(x!tD]}|j|||ƒqWdS(N(t _arg_namesRO(RIRKRLtarg((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt _merge_optsns t R@c Csî|}d}x tD]}||||7}qW|j|ƒgtD]}t||ƒ^qC}|s›g|D]'} t| ƒrŒdj| ƒn| ^qk}n8d„} g|D]"} | | ƒrÇd| n| ^q«}|t|ƒj|ƒ|S(sIFormat 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 s=%st,cSst|tjƒS(N(t isinstancetsixt string_types(R<((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt is_string†ss'%s'(RPtstripRDR>tjoinR;( RItquotetseptprefixtsuffixtargstarg_fmtRQtvalstvRX((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt__strrs   "7 /cCs |jƒS(N(t_SoSOptions__str(RI((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt__str__sc Cs"|jdtddddddƒS(NR[R\s, R]s SoSOptions(R^t)(RdtTrue(RI((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt__repr__scKsd|_t|_t|_d |_t|_t|_d|_t d|_ t d|_ d|_ t|_ d|_d|_t|_g|_d |_d |_t|_d|_t|_t|_t|_t d|_g|_t|_t|_t|_t|_d|_g|_ d |_!g|_"t d|_#g|_$t|_%d |_&d|_'d|_(t|_)d|_*d|_+d|_,d|_-d|_.t d|_/t d |_0t|_1t2ƒ|_3xG|j4ƒD]9}|t5krýt6d |ƒ‚nt7||||ƒqØWd S( sô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. R@RRR R)iR8R5R6s Unknown SoSOptions attribute: %sN(8R tFalseR R RAR,RRRt _arg_defaultsRRRRRRRRRRRRRRRR R!R"R R#R$R%R&R'R(R)R*R+R-R.R/R0R1R2R3R4t upload_methodR5R6R7tsetREtkeysRPt ValueErrorRF(RItkwargsRQ((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt__init__”sh                                                 cCstƒ}|j|tƒ|S(s 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 (R?RRRg(tclsR_topts((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt from_argsÖs cCsld}d}||kr#d|gS||krYgtdt|ƒƒD]}d|^qESd|d|gS(sç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). R sallow-system-changessall-logsRRRRs list-pluginss list-presetss list-profiless no-reports no-env-varsR+R7tverboses--%sis--t=(s alloptionssallow-system-changessall-logssbatchsbuildsdebugs experimentals list-pluginss list-presetss list-profiless no-reports no-env-varssquietsverify(sverbose(trangetint(RqRJR<tno_valuetcounttd((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt _opt_to_argsãs   *c Cs9tƒ}tƒ}yVy&t|ƒ}|j|ƒWdQXWn)ttfk rf}td|ƒ‚nXWn6ttfk r }td||j dfƒ‚nX|j dƒr g}x6|j dƒD]%\} } |j tj | | ƒƒqÆW|j|j|ƒ|ƒng|_|jddƒrg|jj g|jddƒjdƒD]} | jƒ^qKƒn|jddƒrÃg|_|jj g|jddƒjdƒD]} | jƒ^q§ƒn|j d ƒr5g|_xW|j d ƒD]C\} } | jd ƒd |jkrë|jj| d | ƒqëqëWn|S( Ns%Failed to parse configuration file %ss)Unable to read configuration file %s : %sitgeneraltpluginstdisableRTtenablettunablest.iRu(R?RtopentreadfpRRtexittOSErrortIOErrorR_t has_sectiontitemstextendR{RRt parse_argsR!t has_optiontgettsplitRYRR(tappend( Rqt argparserRRLRrtconfigtftetoptlistRJR<tplugin((s0/usr/lib/python2.7/site-packages/sos/__init__.pyt from_fileös@    5  5 "cCs\xUtD]M}t||ƒs"qnt||ƒdk s>| r|j||tƒqqWdS(sNMerge 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. N(RPRCRDRARORi(RIRKt skip_defaultRQ((s0/usr/lib/python2.7/site-packages/sos/__init__.pytmerges cCsIi}x<tD]4}t||ƒ}|dkr7d}n|||RZRgtlen(RR™RQRJ((s0/usr/lib/python2.7/site-packages/sos/__init__.pytargifyWs! &tkeycSs|dS(Ni((tx((s0/usr/lib/python2.7/site-packages/sos/__init__.pytks(tsortedRšRˆ(RIR R¦t opt_itemstnRb((RŸs0/usr/lib/python2.7/site-packages/sos/__init__.pytto_args<s  !(t__name__t __module__RORRRiRdReRhRpt classmethodRsR{RgR•R—RšR­(((s0/usr/lib/python2.7/site-packages/sos/__init__.pyR?Ts     B '  (t__doc__RRVtargparseRtPY3t configparserRRRt __version__t gettext_dirRtbindtextdomainR t_sosRPRjR>tobjectR?(((s0/usr/lib/python2.7/site-packages/sos/__init__.pyts<