From 45298b810c6293cbcd2c4d2fa379ece45040a75e Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Thu, 11 Aug 2016 00:04:37 +0200 Subject: [PATCH] Add more comments. --- cdist/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cdist/config.py b/cdist/config.py index dac5e923..17fb33ca 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -238,6 +238,8 @@ class Config(object): # (address, port, flow_info, scopeid) for AF_INET6 ip_addr = socket.getaddrinfo( host, None, type=socket.SOCK_STREAM)[0][4][0] + # gethostbyaddr returns triple + # (hostname, aliaslist, ipaddrlist) host_name = socket.gethostbyaddr(ip_addr)[0] except socket.gaierror as e: log.error("{}: {}".format(e[0], e[1]))