diff --git a/testing/mozbase/moznetwork/moznetwork/moznetwork.py b/testing/mozbase/moznetwork/moznetwork/moznetwork.py index 909e4bbb83c..ad96d9c488f 100644 --- a/testing/mozbase/moznetwork/moznetwork/moznetwork.py +++ b/testing/mozbase/moznetwork/moznetwork/moznetwork.py @@ -120,8 +120,11 @@ def get_ip(): ips = socket.gethostbyname_ex(hostname)[2] if len(ips) == 1: ip = ips[0] - else: + elif len(ips) > 1: logger.debug('Multiple addresses found: %s' % ips) + # no fallback on Windows so take the first address + ip = ips[0] if mozinfo.isWin else None + else: ip = None except socket.gaierror: # sometimes the hostname doesn't resolve to an ip address, in which