Heray-Was-Here
Server : LiteSpeed
System : Linux server310.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : myveqfxv ( 6863)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /opt/cloudlinux/venv/lib/python3.11/site-packages/gitdb/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/gitdb/utils/encoding.py
def force_bytes(data, encoding="utf-8"):
    if isinstance(data, bytes):
        return data

    if isinstance(data, str):
        return data.encode(encoding)

    return data


def force_text(data, encoding="utf-8"):
    if isinstance(data, str):
        return data

    if isinstance(data, bytes):
        return data.decode(encoding)

    return str(data, encoding)

Hry