mirror of
https://github.com/python/cpython.git
synced 2025-10-01 04:42:10 +00:00
bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696) (#4747)
(cherry picked from commit 961dbe0548
)
This commit is contained in:
parent
8676ac5419
commit
03031fbc7d
2 changed files with 2 additions and 1 deletions
|
@ -358,7 +358,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
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
The getnode() ip getter now uses 'ip link' instead of 'ip link list'.
|
Loading…
Add table
Add a link
Reference in a new issue