Merge pull request #522 from dylanmtaylor/fix-vm-detection-func
Fix is_vm detection on real hardware
This commit is contained in:
commit
5a33ecf875
|
|
@ -110,7 +110,7 @@ def cpu_vendor() -> Optional[str]:
|
|||
def is_vm() -> bool:
|
||||
try:
|
||||
# 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
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in New Issue