관리-도구
편집 파일: __init__.cpython-311.opt-1.pyc
� ��gn � �f � d Z ddlZ G d� de� � Z G d� de� � Z G d� de� � ZdS ) u This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see <https://www.imunify360.com/legal/eula> � Nc �0 � e Zd Zd� Zd� Zed� � � ZdS )�ScanFailedErrorc � � || _ || _ || _ | � |� � | _ | � |� � | _ || _ || _ dS )z� In some scanners out and errors can be lists of bytes or bytes, we will convert all to string :param message: :param command: :param return_code: :param out: :param err: N)�message�command�return_code�_convert_to_str�out�err�path�scan_id)�selfr r r r r r r s �R/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/__init__.py�__init__zScanFailedError.__init__ sV � �( ������&����'�'��,�,����'�'��,�,����� ������ c �f � d� | j | j | j | j | j � � S )Nz@Scan failed with {}: command: {} return code: {} out: {} err: {})�formatr r r r r )r s r �__str__zScanFailedError.__str__6 s5 � � ��f������ ������ � r c �" � t | � � t k r| S t | � � t k rt j | � � S t | � � t k rd� d� | D � � � � S | �dS t d� � �)N� c �j � g | ]0}t |� � t k r|� � � n|��1S � )�type�bytes�decode)�.0�elems r � <listcomp>z3ScanFailedError._convert_to_str.<locals>.<listcomp>J sD � � � � �� &*�$�Z�Z�5�%8�%8�D�K�K�M�M�M�d�� � r z%Unsupported type to convert to string)r �strr �os�fsdecode�list�join� TypeError)�objs r r zScanFailedError._convert_to_strB s� � ���9�9�����J� �#�Y�Y�%� � ��;�s�#�#�#� �#�Y�Y�$� � ��7�7�� � #�� � �� � � �[��2��C�D�D�Dr N)�__name__� __module__�__qualname__r r �staticmethodr r r r r r sR � � � � � �� � �8 � � � �E� E� �\�E� E� Er r c � � e Zd ZdS )�ScanAlreadyCompleteErrorN�r&