diff options
author | Christian Heimes <christian@python.org> | 2022-07-24 06:04:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 06:04:06 (GMT) |
commit | 8184f0fce3b734413e3d3a282f1425d3cb8507fd (patch) | |
tree | 1515ad7ab744e7520a47590fed89cadfbe0de02e /Lib/uuid.py | |
parent | 5c7f3bcdafedd60a385e8ca5403bc6b0b7a862b3 (diff) | |
download | cpython-8184f0fce3b734413e3d3a282f1425d3cb8507fd.zip cpython-8184f0fce3b734413e3d3a282f1425d3cb8507fd.tar.gz cpython-8184f0fce3b734413e3d3a282f1425d3cb8507fd.tar.bz2 |
gh-95174: Handle missing waitpid and gethostbyname in WASI (GH-95181)
Diffstat (limited to 'Lib/uuid.py')
-rw-r--r-- | Lib/uuid.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py index f179d68..8fe2479 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: |