[jkhnddlmZddlmZmZddlmZddlmZ Gdde Z Gdde Z Gd d e Z Gd d e ZGd de ZGdde ZGdde ZGdde ZGdde ZGdde ZGdde ZdS))absolute_import)DictOptional)is_cl_solo_edition)gettextc XeZdZ d dedeededeeffd ZdZxZS) WposErrorNmessagecontextwarningdetailsct|r|n t|_||_||_||_dSN)super__init__dictr r r r)selfr r r r __class__s py/clwpos/cl_wpos_exceptions.pyrzWposError.__init__sH ")5wwtvv    c|jSr)r )rs r__str__zWposError.__str__s |r)r NNN) __name__ __module__ __qualname__strrrrr __classcell__rs@rr r s "+/ $*.   "4.  #3-      rr ceZdZdS)WpCliCommandErrorN)rrrrrr!r! sDrr!c*eZdZdZdZdZfdZxZS)WPOSLicenseMissingz WordPress Licence Exception z?https://docs.cloudlinux.com/cloudlinux_installation/#activationz,https://docs.solo.cloudlinux.com/activation/ctt|tdt t dr|jn|jdS)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 )rr$r_rr SOLO_DOCS_URLSHARED_DOCS_URL)rrs rrzWPOSLicenseMissing.__init__*s  $''00?@@&T:::"*!3!3)  1 r)rrr__doc__r+r*rrrs@rr$r$$sLWOBM          rr$ceZdZdZdS)WpCliUnsupportedExceptionzE Exception when wp-cli could not be run for some reasons Nrrrr,r"rrr.r.8s Drr.ceZdZdZdS)WrongWpPathExceptionz#Exception when wp-path is incorrectNr/r"rrr1r1@s--Drr1ceZdZdZdS) ModuleIsAlreadyDisabledExceptionz-Exception when module is disabled second timeNr/r"rrr3r3Es77Drr3c"eZdZdZfdZxZS) WpUserMissingzA Happens when we cannot find user in /etc/passwd by name cztt|tdd|idS)NzlUser account '%(username)s' is not found in system. Check '/etc/passwd' and make sure that it really exists.z username}r()rr5rr))rusernamers rrzWpUserMissing.__init__NsQ mT""++QRR (+ , - - - - -rrrrr,rrrs@rr5r5JsB---------rr5c"eZdZdZfdZxZS) WpNotExistszB Happens when passed wp instance does not exist on system ctt|tdt |dS)Nz.The %(path)s path to WordPress does not exist.)pathr()rr:rr)r)rwp_pathrs rrzWpNotExists.__init__YsN k4  ))FGGg&&& *     rr8rs@rr:r:UsB         rr:c"eZdZdZfdZxZS)WpConfigWriteFailedz@ Happens when we are unable to write wp-config.php file ctt|tdd|it |dS)NzgUnable to update the %(file)s config file. Error details from the operation system are available below.file)r r r)rr?rr)r)rwp_config_patherrorrs rrzWpConfigWriteFailed.__init__ds[ !4((11UVV^,JJ 2     rr8rs@rr?r?`sB         rr?ceZdZdZdS)WposDaemonLockErrorz(Exception when impossibly to acqure lockNr/r"rrrErEms22DrrEc,eZdZdZdedeffd ZxZS)PhpBrokenExceptionz0Happens when binary file is boken (rpm -V fails) php_bin_pathstderrctt|tdtd||ddS)Nz!PHP binary %(php_bin)s is broken.z7The operating system reported error "%(system_error)s".)php_bin system_error)r rr )rrGrr))rrHrIrs rrzPhpBrokenException.__init__tsX  $''009::OPP ,fEE 1     r)rrrr,rrrrs@rrGrGrsQ:: S #          rrGN) __future__rtypingrrclcommon.lib.cleditionrclwposrr) Exceptionr r!r$r.r1r3r5r:r?rErGr"rrrRs-'&&&&&!!!!!!!!555555                         (             9        y   -----I---     )         )         )             r