$67 GRAYBYTE WORDPRESS FILE MANAGER $91

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/cpapi/

HOME
Current File : /opt/imunify360/venv/lib/python3.11/site-packages/clcommon/cpapi//utils.py
import sys
from functools import wraps
from clcommon.const import Feature
from clcommon.cpapi import is_panel_feature_supported

from clcommon.lib.cledition import (
    CLEditionDetectionError,
)

__all__ = (
    "skip_without_lve",
    "lve_supported_or_exit",
)


_SKIP_MESSAGE = (
    "Command is skipped as LVE feature is not supported in current environment\n"
    "Refer to https://docs.cloudlinux.com/solo/introduction/#cloudlinux-os-editions-comparison for more info"
)


def skip_without_lve():
    try:
        # we still have some utils that could be run
        # under user (e.g cloudlinux-selector)
        if not is_panel_feature_supported(Feature.LVE):
            print(_SKIP_MESSAGE)
            sys.exit(0)
    except CLEditionDetectionError as e:
        print(f"Error: {e}")
        sys.exit(1)


def lve_supported_or_exit(f):
    @wraps(f)
    def inner(*args, **kwargs):
        if not is_panel_feature_supported(Feature.LVE):
            print(_SKIP_MESSAGE)
        else:
            return f(*args, **kwargs)

    return inner


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2026 8.59 AM
root / root
0755
GeneralPanel
--
3 Mar 2026 8.59 AM
root / root
0755
__pycache__
--
3 Mar 2026 8.59 AM
root / root
0755
cache
--
3 Mar 2026 8.59 AM
root / root
0755
plugins
--
3 Mar 2026 8.59 AM
root / root
0755
__init__.py
14.542 KB
13 Feb 2026 12.40 PM
root / root
0644
apilink.py
0.261 KB
13 Feb 2026 12.40 PM
root / root
0644
clcpapi.py
3.643 KB
13 Feb 2026 12.40 PM
root / root
0644
const.py
0.499 KB
13 Feb 2026 12.40 PM
root / root
0644
cpapicustombin.py
2.123 KB
13 Feb 2026 12.40 PM
root / root
0644
cpapiexceptions.py
1.748 KB
13 Feb 2026 12.40 PM
root / root
0644
panel_hooks_lib.py
1.225 KB
13 Feb 2026 12.40 PM
root / root
0644
pluginlib.py
7.57 KB
13 Feb 2026 12.40 PM
root / root
0644
utils.py
1.029 KB
13 Feb 2026 12.40 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF