refs #1059 add ogIsVirtualMachine()
parent
eaee15b7d4
commit
9301d9aaaf
|
@ -309,8 +309,5 @@ def ogCheckProgram(*args):
|
|||
return 0
|
||||
|
||||
def ogIsVirtualMachine():
|
||||
output = subprocess.check_output(["dmidecode", "-s", "system-product-name"]).decode("utf-8")
|
||||
if "KVM" in output or "VirtualBox" in output:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
output = subprocess.run (["dmidecode", "-s", "system-product-name"], capture_output=True, text=True).stdout
|
||||
return "KVM" in output or "VirtualBox" in output
|
||||
|
|
Loading…
Reference in New Issue