id DddlZddlmZGddeZGddeZy)N) SoSComponentc<eZdZdZdZdZdZdZdZdZ e dZ y) MissingCollectaKThis is used as a placeholder for when the local sos installation attempts to import sos.collector, but that module is not present. In those scenarios, it means that sos has been split into sub-packages. Barring incorrect splitting, this 'sos.missing' module should always be available to the main sos package. Fz7(unavailable) Collect an sos report from multiple nodeszIt appears likely that your distribution separately ships a package called sos-collector. Please install it to enable this functioncBtjjdy)NzThe collect command is unavailable as it appears to be packaged separately for your distribution. Please install the latest sos-collector package to enable this functionality. sysstderrwriteselfs -/usr/lib/python3/dist-packages/sos/missing.pyexecutezMissingCollect.executes  D cgS)zOverride the normal component method to basically ignore all options given, so that we always print the error message that collect is unavailable, rather than failing on the parser when collect is called with options. r s r load_optionszMissingCollect.load_optionss  rc6dd|j}||_|S)zpSet the --help output for collect to a message that shows that the functionality is unavailable z;WARNING: `collect` is not available with this installation! ) missing_msgepilog)clsparsermsgs r add_parser_optionsz!MissingCollect.add_parser_options%s$ J OO   rN) __name__ __module__ __qualname____doc__ load_policyconfigure_loggingdescrrr classmethodrrrr rrsBK DD J    rrceZdZdZdZdZy)MissingPexpectzThis is used as a placeholder for when the collect component is locally installed, but cannot be used due to a missing pexpect dependency. zaPlease install the python3-pexpect package for your distribution in order to enable this functioncBtjjdy)NzThe collect command is unavailable due to a missing dependency on python3-pexpect. Please install python3-pexpect to enable this functionality. rr s r rzMissingPexpect.execute<s  $ rN)rrrrrrrrr r$r$2s  (  rr$)r sos.componentrrr$rrr r's$ &)\)X ^ r