From 961dbe0548e26394b7716d41423c61b1e2e58ef7 Mon Sep 17 00:00:00 2001 From: xdegaye Date: Thu, 7 Dec 2017 12:59:13 +0100 Subject: [PATCH] bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696) --- Lib/uuid.py | 2 +- .../next/Library/2017-12-04-12-23-26.bpo-32199.nGof4v.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2017-12-04-12-23-26.bpo-32199.nGof4v.rst diff --git a/Lib/uuid.py b/Lib/uuid.py index be06a6eff3f..b7433cb7192 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -401,7 +401,7 @@ def _ifconfig_getnode(): def _ip_getnode(): """Get the hardware address on Unix by running ip.""" # This works on Linux with iproute2. - mac = _find_mac('ip', 'link list', [b'link/ether'], lambda i: i+1) + mac = _find_mac('ip', 'link', [b'link/ether'], lambda i: i+1) if mac: return mac return None diff --git a/Misc/NEWS.d/next/Library/2017-12-04-12-23-26.bpo-32199.nGof4v.rst b/Misc/NEWS.d/next/Library/2017-12-04-12-23-26.bpo-32199.nGof4v.rst new file mode 100644 index 00000000000..d5f88cef5c7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2017-12-04-12-23-26.bpo-32199.nGof4v.rst @@ -0,0 +1 @@ +The getnode() ip getter now uses 'ip link' instead of 'ip link list'.