B Pb d Z ddlZddlmZ ddlmZ ddlmZ dZ G d de Z G d d e Z G d de Z G d d ZdS )z, Everything that is related to whmapi calls N)FormattedException)run_command) urlencode) WhmApiRequestWhmApiErrorc e Zd ZdZd ZdS )r zW An error that is raised in case of an error in communication with whmapi. c 6 t j | ||d d S )N)messagecontext)r __init__)selfr r s w/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/lib/whmapi_lib.pyr zWhmApiError.__init__ s3 #D+ + N)__name__ __module____qualname____doc__r r r r r s- r r c e Zd ZdZdS )WhmLicenseErrorz)A license-related error raised by whmapi.Nr r r r r r r r r " s 33Dr r c e Zd ZdZdS )WhmNoPhpBinariesErrorz; An error when there are no installed php binaries Nr r r r r r ' s Dr r c t e Zd ZdZdZdZd Zd Zed Z e d Ze d Zd Z d ZdS )r a Wrapper over cpanel's whm command-line api tool that allows us to easily build complex requests (filter, sorting, etc) See details in the official cpanel docs (link below) https://documentation.cpanel.net/display/DD/Guide+to+WHM+API+1 z/usr/sbin/whmapi1 c B || _ i | _ i | _ ddg| _ d S )Nz--outputjson)_command_filters_args_extra_args)r commands r r zWhmApiRequest.__init__: s* &/r c X t |d \ }}}|dk rt d| t j | }d|v r#d|d v r|d d d|d d<