| Server IP : 162.214.74.102 / Your IP : 216.73.217.114 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /opt/alt/python38/lib64/python3.8/site-packages/pycares/ |
Upload File : |
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