REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.17 KB
Close
/proc/thread-self/root/opt/cloudlinux/venv/lib/python3.11/site-packages/ssa/configuration/__init__.py
Text
Base64
import json from urllib.request import urlopen from schema import Schema from .parser import SSAConfigParser from .validation import validate from ..internal.exceptions import SSAError def load_parser() -> SSAConfigParser: """ Create parser and load configuration :return: parser """ conf = SSAConfigParser() conf.read_ssa_conf() return conf def load_validated_parser() -> SSAConfigParser: """ Create parser, load configuration, validate it :return: parser """ conf = load_parser() _ = validate(dict(conf.items())) return conf def load_configuration() -> dict: """ Load and validate configuration """ conf = load_parser() return validate(dict(conf.items())) def load_tunables(external_source: str, scheme: Schema) -> dict: """ Load values from remote JSON config or default values in case of troubles """ cfg_location = f"https://repo.cloudlinux.com/cloudlinux/sources/da/{external_source}" try: with urlopen(cfg_location) as cfg: return validate(json.load(cfg), scheme) except (OSError, json.JSONDecodeError, SSAError): return validate(dict(), scheme)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
schemes
DIR
-
drwxr-xr-x
2026-03-14 07:02:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-03-14 07:03:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
parser.py
7.76 KB
lrw-r--r--
2026-02-10 14:39:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validation.py
2.05 KB
lrw-r--r--
2026-02-10 14:39:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
1.17 KB
lrw-r--r--
2026-02-10 14:39:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).