aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/uuid.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/uuid.py')
-rw-r--r--Lib/uuid.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py
index f179d68e826..8fe2479f3f2 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -524,6 +524,8 @@ def _ip_getnode():
def _arp_getnode():
"""Get the hardware address on Unix by running arp."""
import os, socket
+ if not hasattr(socket, "gethostbyname"):
+ return None
try:
ip_addr = socket.gethostbyname(socket.gethostname())
except OSError: