diff -r e106d9368bff Lib/uuid.py --- a/Lib/uuid.py Fri Nov 14 11:20:07 2014 +0100 +++ b/Lib/uuid.py Fri Nov 14 21:36:47 2014 +0200 @@ -345,7 +345,10 @@ def _ifconfig_getnode(): def _arp_getnode(): """Get the hardware address on Unix by running arp.""" import os, socket - ip_addr = socket.gethostbyname(socket.gethostname()) + try: + ip_addr = socket.gethostbyname(socket.gethostname()) + except socket.gaierror: + return None # Try getting the MAC addr from arp based on our IP address (Solaris). return _find_mac('arp', '-an', [ip_addr], lambda i: -1)