Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions machineid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ def id(winregistry: bool = True) -> str:
if not id:
id = __exec__("powershell.exe -ExecutionPolicy bypass -command (Get-CimInstance -Class Win32_ComputerSystemProduct).UUID")
if not id:
id = __exec__('wmic csproduct get uuid').split('\n')[2] \
.strip()
id_temp = __exec__('wmic csproduct get uuid')
if id_temp is not None:
id = id_temp.split('\n')[2].strip()

elif platform.startswith('linux'):
id = __read__('/var/lib/dbus/machine-id')
if not id:
Expand Down
Loading