Commit 06b70e4f by Adam Miller

When checking for Xen for LinuxHardware processor facts, don't check sysfs if…

When checking for Xen for LinuxHardware processor facts, don't check sysfs if already found in /proc/
parent f2742348
...@@ -612,10 +612,10 @@ class LinuxHardware(Hardware): ...@@ -612,10 +612,10 @@ class LinuxHardware(Hardware):
xen = False xen = False
xen_paravirt = False xen_paravirt = False
if os.path.exists('/proc/xen'):
xen = True
try: 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 xen = True
except IOError: except IOError:
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment