관리-도구
편집 파일: subprocess.cpython-311.opt-1.pyc
� IMg" � �Z � d Z ddlZddlZddlmZ g d�Z G d� dej � � Zd� ZdS )z0General utilities for working with subprocesses.� N)�PIPE)r �CalledProcessError�check_outputc � � e Zd ZdZd� ZdS )r z'Add stdout,stderr to str representationc �& � | j rn| j dk rcd| j �dt j | j � � �d| j �d| j ��S # t $ r! d| j | j | j | j fz cY S w xY wd| j | j | j | j fz S )Nr z Command 'z' died with z . Stdout: z Stderr: z?Command '%s' died with unknown signal %d. Stdout: %s Stderr: %szDCommand '%s' returned non-zero exit status %d. Stdout: %s Stderr: %s)� returncode�cmd�signal�Signals�stdout�stderr� ValueError)�selfs �U/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/utils/subprocess.py�__str__zCalledProcessError.__str__ s� � ��?� �t���2�2� ��H�H�H��N���(�� � � � �K�K�K��K�K� � �� � � � �/��x�$�/�!1�4�;���L�M�� � � ����+��8�T�_�d�k�4�;�G�H� s �4A �(A3�2A3N)�__name__� __module__�__qualname__�__doc__r � � r r r s) � � � � � �1�1�� � � � r r c � � t j | i |��S # t j $ r,}t |j |j |j |j � � d�d}~ww xY w)z_A wrapper for stdlib subprocess.check_output. Include stdout/stderr in error message. N)� subprocessr r r r r r )�args�kwargs�es r r r % se � � ��&��7��7�7�7���(� � � � � �L�!�%���1�8� � �� ��������s � �A�'A � A)r r r r �__all__r r r r r �<module>r s� �� 6� 6� � � � � � � � � � � � � � � 8� 8� 8��� � � � ��6� � � �8 � � � � r