Add more comments.
This commit is contained in:
parent
dbcc94ab65
commit
45298b810c
1 changed files with 2 additions and 0 deletions
|
@ -238,6 +238,8 @@ class Config(object):
|
||||||
# (address, port, flow_info, scopeid) for AF_INET6
|
# (address, port, flow_info, scopeid) for AF_INET6
|
||||||
ip_addr = socket.getaddrinfo(
|
ip_addr = socket.getaddrinfo(
|
||||||
host, None, type=socket.SOCK_STREAM)[0][4][0]
|
host, None, type=socket.SOCK_STREAM)[0][4][0]
|
||||||
|
# gethostbyaddr returns triple
|
||||||
|
# (hostname, aliaslist, ipaddrlist)
|
||||||
host_name = socket.gethostbyaddr(ip_addr)[0]
|
host_name = socket.gethostbyaddr(ip_addr)[0]
|
||||||
except socket.gaierror as e:
|
except socket.gaierror as e:
|
||||||
log.error("{}: {}".format(e[0], e[1]))
|
log.error("{}: {}".format(e[0], e[1]))
|
||||||
|
|
Loading…
Reference in a new issue