gb 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 .
Copyright © 2019 Cloud Linux Software Inc.
This software is also available under ImunifyAV commercial license,
see
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)messagecommandreturn_code_convert_to_strouterrpathscan_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 u r| S t | t u rt j | S t | t
u rd d | D S | dS t d )N c f g | ].}t | t u r| n|/S )typebytesdecode).0elems r
z3ScanFailedError._convert_to_str..J sD &*$ZZ5%8%8DKKMMMd r z%Unsupported type to convert to string)r strr osfsdecodelistjoin TypeError)objs r r zScanFailedError._convert_to_strB s 99J
#YY%
;s###
#YY$
77 #
[2CDDDr N)__name__
__module____qualname__r r staticmethodr r r r r r sR 8
E E \E E Er r c e Zd ZdS )ScanAlreadyCompleteErrorNr&