Prv8 Shell
Server : Apache
System : Linux ecngx264.inmotionhosting.com 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64
User : lonias5 ( 3576)
PHP Version : 7.3.33
Disable Function : NONE
Directory :  /proc/self/root/proc/thread-self/root/opt/saltstack/salt/extras-3.10/cpapis/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/thread-self/root/opt/saltstack/salt/extras-3.10/cpapis/_errors.py
"""Errors (and warnings) for cpapis"""


class CpAPIError(Exception):
    """Parent class for all errors running uapi/whmapi/cpapi"""

    __module__ = 'cpapis'


class CpAPIErrorMsg(CpAPIError):
    """Raised when an API executes and returns valid JSON, but the operation
    fails and reports a specific error message. This differs per API function"""

    __module__ = 'cpapis'

    def __init__(self, *, msg: str, data: dict):
        super().__init__(str(msg))
        self.data = data


class CpAPIExecFail(CpAPIError):
    """Raised when an API call fails to run at all by exiting non-zero, timing
    out or returning invalid JSON

    Attributes:
      cmd: The list or str args passed to run().
      returncode: The exit code of the process, negative for signals.
      stdout: The standard output
      stderr: The standard error
    """

    __module__ = 'cpapis'

    def __init__(
        self,
        *,
        msg: str,
        cmd: list[str],
        stdout: str,
        stderr: str,
        returncode: int,
    ):
        super().__init__(msg)
        self.cmd = cmd
        self.stdout = stdout
        self.stderr = stderr
        self.returncode = returncode


class CpAPIDeprecation(DeprecationWarning):
    """Subclass of DeprecationWarning for cpapis"""

    __module__ = 'cpapis'

@StableExploit - 2025