Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -259,7 +259,10 @@ logger.info('Reporting for task uuid: "{}"'.format(task_uuid)) ...@@ -259,7 +259,10 @@ logger.info('Reporting for task uuid: "{}"'.format(task_uuid))
# Get IP # Get IP
ip = socket.gethostbyname(hostname) ip = socket.gethostbyname(hostname)
if ip == '127.0.1.1': if ip == '127.0.1.1':
try:
ip = socket.gethostbyname(hostname+'.local') ip = socket.gethostbyname(hostname+'.local')
except:
pass
logger.info(' - ip: "{}"'.format(ip)) logger.info(' - ip: "{}"'.format(ip))
# Get port # Get port
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment