HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/cloudlinux/venv/lib/python3.11/site-packages/clwizard/exceptions.py
#!/opt/cloudlinux/venv/bin/python3 -bb
# coding=utf-8
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENCE.TXT
#

from clcommon import FormattedException


class InstallationFailedException(Exception):
    """
    Exception that should be raised to signal
    that some bad error happened during installation
    and user should review log files
    """
    pass


class PackageMissingError(FormattedException):
    """
    Exception that should be raised when we are missing
    some required package for wizard work
    """
    def __init__(self, package):
        super().__init__({
            'message': "This module requires '%(package)s' package, but it "
                       "is missing in system. Please install it and try again.",
            'context': {'package': package}
        })


class CancelModuleException(FormattedException):
    """
    Error that is raised when it is not permitted to cancel module
    installation, e.g. module is installing at the moment.
    """
    def __init__(self, module, status):
        super().__init__({
            'message': 'Module "%(module)s" can\'t be cancelled as it is in status "%(status)s".',
            'context': {'module': module, 'status': status}
        })


class UserInterventionNeededError(Exception):
    """
    Exception that is raised when it is impossible to install module
    (package) automatically
    """
    pass