Kaydet (Commit) 03031fbc authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) xdegaye

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

(cherry picked from commit 961dbe05)
üst 8676ac54
...@@ -358,7 +358,7 @@ def _ifconfig_getnode(): ...@@ -358,7 +358,7 @@ def _ifconfig_getnode():
def _ip_getnode(): def _ip_getnode():
"""Get the hardware address on Unix by running ip.""" """Get the hardware address on Unix by running ip."""
# This works on Linux with iproute2. # 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: if mac:
return mac return mac
......
The getnode() ip getter now uses 'ip link' instead of 'ip link list'.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment