[jkh n d dl mZ d dlmZmZ d dlmZ d dlmZ G d de
Z G d de Z G d d
e Z
G d de Z G d
de Z G d de Z G d de Z G d de Z G d de Z G d de Z G d de ZdS ) )absolute_import)DictOptional)is_cl_solo_edition)gettextc
X e Zd Z d dedee dedee f fd
Zd Z xZS )
WposError Nmessagecontextwarningdetailsc t |r|n
t | _ || _ || _ || _ d S N)super__init__dictr r
r r )selfr r r
r __class__s py/clwpos/cl_wpos_exceptions.pyr zWposError.__init__ sH
")5wwtvv c | j S r )r )r s r __str__zWposError.__str__ s
|r )r
NNN) __name__
__module____qualname__strr r r r
__classcell__r s @r r r s "+/ $*. "4. #3- r r c e Zd ZdS )WpCliCommandErrorN)r r r r r r! r! s Dr r! c * e Zd ZdZdZdZ fdZ xZS )WPOSLicenseMissingz WordPress Licence Exception
z?https://docs.cloudlinux.com/cloudlinux_installation/#activationz,https://docs.solo.cloudlinux.com/activation/c t t | t d t t d r| j n| j d S )NznCloudLinux license isn't valid. Follow the (%(license_docs_url)s) guide and activate your CloudLinux instance.T)skip_jwt_check)license_docs_urlr r )r r$ r _r r
SOLO_DOCS_URLSHARED_DOCS_URL)r r s r r zWPOSLicenseMissing.__init__* s
$''00 ? @ @ &T:::"*!3!3 ) 1
r )r r r __doc__r+ r* r r r s @r r$ r$ $ sL WOBM
r r$ c e Zd ZdZdS )WpCliUnsupportedExceptionzE
Exception when wp-cli could not be run for
some reasons
Nr r r r, r" r r r. r. 8 s Dr r. c e Zd ZdZdS )WrongWpPathExceptionz#Exception when wp-path is incorrectNr/ r" r r r1 r1 @ s --Dr r1 c e Zd ZdZdS ) ModuleIsAlreadyDisabledExceptionz-Exception when module is disabled second timeNr/ r" r r r3 r3 E s 77Dr r3 c " e Zd ZdZ fdZ xZS )
WpUserMissingzA
Happens when we cannot find user in /etc/passwd by name
c z t t | t d d|i d S )NzlUser account '%(username)s' is not found in system. Check '/etc/passwd' and make sure that it really exists.z username}r( )r r5 r r) )r usernamer s r r zWpUserMissing.__init__N sQ
mT""++ Q R R (+ , - - - - -r r r r r, r r r s @r r5 r5 J sB - - - - - - - - -r r5 c " e Zd ZdZ fdZ xZS )WpNotExistszB
Happens when passed wp instance does not exist on system
c t t | t d t | d S )Nz.The %(path)s path to WordPress does not exist.)pathr( )r r: r r) r )r wp_pathr s r r zWpNotExists.__init__Y sN
k4 ))FGGg&&& *
r r8 r s @r r: r: U sB
r r: c " e Zd ZdZ fdZ xZS )WpConfigWriteFailedz@
Happens when we are unable to write wp-config.php file
c t t | t d d|it | d S )NzgUnable to update the %(file)s config file. Error details from the operation system are available below.file)r r r )r r? r r) r )r wp_config_patherrorr s r r zWpConfigWriteFailed.__init__d s[
!4((11 U V V^,JJ 2
r r8 r s @r r? r? ` sB
r r? c e Zd ZdZdS )WposDaemonLockErrorz(Exception when impossibly to acqure lockNr/ r" r r rE rE m s 22Dr rE c , e Zd ZdZdedef fdZ xZS )PhpBrokenExceptionz0Happens when binary file is boken (rpm -V fails)php_bin_pathstderrc t t | t d t d ||d d S )Nz!PHP binary %(php_bin)s is broken.z7The operating system reported error "%(system_error)s".)php_binsystem_error)r r r )r rG r r) )r rH rI r s r r zPhpBrokenException.__init__t sX
$''009::OPP ,fEE 1
r )r r r r, r r r r s @r rG rG r sQ ::
S
#
r rG N)
__future__r typingr r clcommon.lib.cleditionr clwposr r) Exceptionr r! r$ r. r1 r3 r5 r: r? rE rG r" r r