$11 GRAYBYTE WORDPRESS FILE MANAGER $68

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/urllib3/util/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/urllib3/util//util.py
from __future__ import annotations

import typing
from types import TracebackType


def to_bytes(
    x: str | bytes, encoding: str | None = None, errors: str | None = None
) -> bytes:
    if isinstance(x, bytes):
        return x
    elif not isinstance(x, str):
        raise TypeError(f"not expecting type {type(x).__name__}")
    if encoding or errors:
        return x.encode(encoding or "utf-8", errors=errors or "strict")
    return x.encode()


def to_str(
    x: str | bytes, encoding: str | None = None, errors: str | None = None
) -> str:
    if isinstance(x, str):
        return x
    elif not isinstance(x, bytes):
        raise TypeError(f"not expecting type {type(x).__name__}")
    if encoding or errors:
        return x.decode(encoding or "utf-8", errors=errors or "strict")
    return x.decode()


def reraise(
    tp: type[BaseException] | None,
    value: BaseException,
    tb: TracebackType | None = None,
) -> typing.NoReturn:
    try:
        if value.__traceback__ is not tb:
            raise value.with_traceback(tb)
        raise value
    finally:
        value = None  # type: ignore[assignment]
        tb = None

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Aug 2025 9.24 PM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
1.026 KB
17 Apr 2025 8.10 PM
root / root
0644
connection.py
4.357 KB
17 Apr 2025 8.10 PM
root / root
0644
proxy.py
1.121 KB
17 Apr 2025 8.10 PM
root / root
0644
request.py
7.894 KB
17 Apr 2025 8.10 PM
root / root
0644
response.py
3.295 KB
17 Apr 2025 8.10 PM
root / root
0644
retry.py
17.943 KB
17 Apr 2025 8.10 PM
root / root
0644
ssl_.py
18.793 KB
17 Apr 2025 8.10 PM
root / root
0644
ssl_match_hostname.py
5.676 KB
17 Apr 2025 8.10 PM
root / root
0644
ssltransport.py
8.833 KB
17 Apr 2025 8.10 PM
root / root
0644
timeout.py
10.282 KB
17 Apr 2025 8.10 PM
root / root
0644
url.py
14.856 KB
17 Apr 2025 8.10 PM
root / root
0644
util.py
1.119 KB
17 Apr 2025 8.10 PM
root / root
0644
wait.py
4.319 KB
17 Apr 2025 8.10 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF