Fix setup when /sys/block is inaccessible

This commit is contained in:
Daniel Hokka Zakrisson 2013-02-11 23:24:47 +01:00
parent 75651da37c
commit e8279f0513

7
setup
View file

@ -381,7 +381,12 @@ class LinuxHardware(Hardware):
if lspci:
rc, pcidata, err = module.run_command(lspci)
for block in os.listdir("/sys/block"):
try:
block_devs = os.listdir("/sys/block")
except OSError:
return
for block in block_devs:
virtual = 0
sysfs_no_links = 0
try: