From: Michael Tremer Date: Mon, 27 Dec 2010 17:32:35 +0000 (+0100) Subject: Fix hypervisor type detection when the C module does not return anything. X-Git-Tag: v2.0.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cf29180c95ef25ddc4c58eb233b9038002f62a4;p=oddments%2Ffireinfo.git Fix hypervisor type detection when the C module does not return anything. --- diff --git a/fireinfo/hypervisor.py b/fireinfo/hypervisor.py index cdc9efd..10612d5 100644 --- a/fireinfo/hypervisor.py +++ b/fireinfo/hypervisor.py @@ -78,7 +78,13 @@ class Hypervisor(object): if not self.virtual: return None - return self.__info["virtype"] + if self.__info["virtype"]: + return self.__info["virtype"] + + if self.hypervisor in ("Qemu", "KVM", "VirtualBox", "VMWare"): + return "full" + + return "unknown" @property def virtual(self):