Fix is_vm detection on real hardware
This commit is contained in:
parent
f4bb884625
commit
8ddb9153c7
|
|
@ -110,7 +110,7 @@ def cpu_vendor() -> Optional[str]:
|
||||||
def is_vm() -> bool:
|
def is_vm() -> bool:
|
||||||
try:
|
try:
|
||||||
# systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine
|
# systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine
|
||||||
if b"".join(SysCommand("systemd-detect-virt")).lower() != b"none":
|
if b"none" not in b"".join(SysCommand("systemd-detect-virt")).lower():
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue