Skip to content

Commit

Permalink
When checking for Xen for LinuxHardware processor facts, don't check …
Browse files Browse the repository at this point in the history
…sysfs if already found in /proc/
  • Loading branch information
maxamillion committed Jan 8, 2015
1 parent f274234 commit 06b70e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ansible/module_utils/facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,10 @@ def get_cpu_facts(self):

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
Expand Down

0 comments on commit 06b70e4

Please sign in to comment.