File: //usr/lib/python3.6/site-packages/sos/help/__pycache__/__init__.cpython-36.pyc
3
-�_g
+ � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z d dl
mZ d dlm
Z
d dlmZmZ yeej� jd�ZW n ek
r� dZY nX G d d
� d
e �ZG dd� d�ZdS )
� N)�OrderedDict)�fill)�SoSComponent)�
import_policy)�Plugin)�bold�ImporterHelper�x c s� e Zd ZdZdZdZdZdZddiZ� fdd�Z e
dd � �Zd
d� Zdd
� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Z� ZS )� SoSHelperz�Provide better, more in-depth help for specific parts of sos than is
provided in either standard --help output or in manpages.
zDetailed help infomationF�topic� c s t � j|||� | jj| _d S )N)�super�__init__�optsr )�self�parser�argsZcmdline)� __class__� �/usr/lib/python3.6/__init__.pyr + s zSoSHelper.__init__c C s* d|_ |jdd�}|jdddddd � d S )
Nzsos help TOPIC [options]zHelp Information Optionsz<These options control what detailed information is displayedr ZTOPICr �?z/name of the topic or component to show help for)�metavar�default�nargs�help)�usageZadd_argument_group�add_argument)�clsr Zhelp_grpr r r �add_parser_options/ s zSoSHelper.add_parser_optionsc C sB | j jjd�d }dddd�}||kr>| j jj||| �| j _d S )N�.r �cleaner� collector)�clean�mask�collect)r r �split�replace)r Z_com�_replacer r r �sanitize_topic_component: s z"SoSHelper.sanitize_topic_componentc C s� | j js| j� tjd� | j� y| j� }W nD tk
rr } z(td| j j� d|� �� tjd� W Y d d }~X nX |r�yt � }|j
|� |j� W q� tk
r� } ztd|� �� W Y d d }~X q�X ntd| j j� d�� d S )Nr zCould not load help for 'z': � zError loading help: zNo help section found for '�')r r �display_self_help�sys�exitr( �get_obj_for_topic� Exception�print�HelpSectionZdisplay_help�display)r �klass�errZhtr r r �executeD s"