When checking for Xen for LinuxHardware processor facts, don't check sysfs if already found in /proc/

pull/9947/head
Adam Miller 10 years ago
parent f274234824
commit 06b70e4f9c

@ -612,10 +612,10 @@ class LinuxHardware(Hardware):
xen = False
xen_paravirt = False
if os.path.exists('/proc/xen'):
xen = True
try:
if open('/sys/hypervisor/type').readline().strip() == 'xen':
if os.path.exists('/proc/xen'):
xen = True
elif open('/sys/hypervisor/type').readline().strip() == 'xen':
xen = True
except IOError:
pass

Loading…
Cancel
Save