bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696)

This commit is contained in:
xdegaye 2017-12-07 12:59:13 +01:00 committed by GitHub
parent fb77e0d855
commit 961dbe0548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1 @@
The getnode() ip getter now uses 'ip link' instead of 'ip link list'.