← Back
Editing: __init__.cpython-312.pyc
� ܓ�i�7 � �f � d Z ddlZddlZddlZddlZddlZddlZddlZddlmZm Z ddl Z ddlZddlZddl Z ddlmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z% d� Z&d � Z'd � Z( ejR dejT � Z+dZ, G d � d� Z- G d� d� Z. G d� d� Z/ G d� d� Z0 G d� d� Z1 G d� de1� Z2 G d� de1� Z3 G d� de1� Z4 G d� de1� Z5 G d� d e1� Z6 G d!� d"e1� Z7 G d#� d$e1� Z8 G d%� d&e1� Z9 G d'� d(e1� Z:d*d)�Z;y)+z; This exports methods available for use by plugins for sos � N)�time�sleep)�datetime)�Path)�sos_get_command_output� import_module�grep�fileobj�tail� is_executable�TIMEOUT_DEFAULT�path_exists� path_isdir�path_isfile�path_islink�listdir� path_join�bold�file_is_binary�recursive_dict_values_by_key)�P_FILE�P_LINK� P_CONTFILEc �� � t |� 5 }t j | |j � t j � cddd� S # 1 sw Y yxY w# t $ r g cY S w xY w)z=Return a list of all non overlapping matches in the string(s)N)r �re�findall�read� MULTILINE�AttributeError)�regex�fname�fs �@/usr/lib/python3.12/site-packages/sos/report/plugins/__init__.py� regex_findallr$ ( sG � �� �U�^�q��:�:�e�Q�V�V�X�r�|�|�<� �^�^��� �� ��s. �A �3A � A � A�A �A �A$�#A$c � � t j dd| � }t j dd|� }t j dd|� j d� }|d| }|S ) Nz^/(usr/|)(bin|sbin)/� z[^\w\-\.\/]+�_�/�.z ._-r )r �sub�strip)�command�name_max�manglednames r# �_mangle_commandr/ 1 sV � ��&�&�0�"�g�>�K��&�&��#�{�;�K��&�&��s�K�0�6�6�v�>�K��a��)�K��� c �� � t j dft j dft j dft j dfg}|D ] } |d | j � s�|d c S y)z� return a string indicating the type of special node represented by the stat buffer st (block, character, fifo, socket). zblock devicezcharacter devicez named pipe�socketr � r&