관리-도구
편집 파일: __init__.cpython-39.pyc
a -�_g + � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZ d dlm Z d dlmZmZ zee�� jd�ZW n ey� dZY n0 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 � �|||� | jj| _d S )N)�super�__init__�optsr )�self�parser�argsZcmdline�� __class__� �5/usr/lib/python3.9/site-packages/sos/help/__init__.pyr + s zSoSHelper.__init__c C s* d|_ |�dd�}|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)�usage�add_argument_group�add_argument)�clsr Zhelp_grpr r r �add_parser_options/ s ��zSoSHelper.add_parser_optionsc C sB | j j�d�d }dddd�}||v r>| j j�||| �| 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| �� t�d� | �� z| �� }W nF tyt } z.td| j j� d|� �� t�d� W Y d }~n d }~0 0 |r�zt � }|� |� |�� W q� ty� } ztd|� �� W Y d }~q�d }~0 0 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"