HEX
Server: LiteSpeed
System: Linux php-prod-3.spaceapp.ru 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: sarli3128 (1010)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/imunify360/venv/lib64/python3.11/site-packages/pycares/errno.py
from ._cares import ffi as _ffi, lib as _lib
from .utils import maybe_str


exported_pycares_symbols = [
    'ARES_SUCCESS',
    # error codes
    'ARES_ENODATA',
    'ARES_EFORMERR',
    'ARES_ESERVFAIL',
    'ARES_ENOTFOUND',
    'ARES_ENOTIMP',
    'ARES_EREFUSED',
    'ARES_EBADQUERY',
    'ARES_EBADNAME',
    'ARES_EBADFAMILY',
    'ARES_EBADRESP',
    'ARES_ECONNREFUSED',
    'ARES_ETIMEOUT',
    'ARES_EOF',
    'ARES_EFILE',
    'ARES_ENOMEM',
    'ARES_EDESTRUCTION',
    'ARES_EBADSTR',
    'ARES_EBADFLAGS',
    'ARES_ENONAME',
    'ARES_EBADHINTS',
    'ARES_ENOTINITIALIZED',
    'ARES_ELOADIPHLPAPI',
    'ARES_EADDRGETNETWORKPARAMS',
    'ARES_ECANCELLED',
    'ARES_ESERVICE'
]

errorcode = {}

for symbol in exported_pycares_symbols:
    value = getattr(_lib, symbol)
    globals()[symbol] = value
    globals()["errorcode"][value] = symbol


def strerror(code):
    return maybe_str(_ffi.string(_lib.ares_strerror(code)))


__all__ = exported_pycares_symbols + ['errorcode', 'strerror']

del exported_pycares_symbols