Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Lib/uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,12 @@ def _get_command_stdout(command, *args):
# for are actually localized, but in theory some system could do so.)
env = dict(os.environ)
env['LC_ALL'] = 'C'
proc = subprocess.Popen((executable,) + args,
# Empty strings will be quoted by popen so we should just ommit it
if args != ('',):
command = (executable, *args)
else:
command = (executable,)
proc = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
env=env)
Expand Down Expand Up @@ -511,7 +516,7 @@ def _ifconfig_getnode():
mac = _find_mac_near_keyword('ifconfig', args, keywords, lambda i: i+1)
if mac:
return mac
return None
return None

def _ip_getnode():
"""Get the hardware address on Unix by running ip."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix detection of MAC addresses for :mod:`uuid` on certain OSs. Patch by Chaim Sanders