Commit c7f72c7e authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed an issue in obtaining the IP of the host from the agent.

parent 902120c1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -259,7 +259,10 @@ logger.info('Reporting for task uuid: "{}"'.format(task_uuid))
# Get IP
ip = socket.gethostbyname(hostname)
if ip == '127.0.1.1':
    try:
        ip = socket.gethostbyname(hostname+'.local')
    except:
        pass
logger.info(' - ip: "{}"'.format(ip))

# Get port