When checking for Xen for LinuxHardware processor facts, don't check sysfs if already found in /proc/
This commit is contained in:
parent
f274234824
commit
06b70e4f9c
1 changed files with 3 additions and 3 deletions
|
@ -612,10 +612,10 @@ class LinuxHardware(Hardware):
|
||||||
|
|
||||||
xen = False
|
xen = False
|
||||||
xen_paravirt = False
|
xen_paravirt = False
|
||||||
|
try:
|
||||||
if os.path.exists('/proc/xen'):
|
if os.path.exists('/proc/xen'):
|
||||||
xen = True
|
xen = True
|
||||||
try:
|
elif open('/sys/hypervisor/type').readline().strip() == 'xen':
|
||||||
if open('/sys/hypervisor/type').readline().strip() == 'xen':
|
|
||||||
xen = True
|
xen = True
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue