Protect None value in setup module

reviewable/pr18780/r1
Jan-Piet Mens 12 years ago
parent 30cab814e8
commit 846b48655b

@ -619,6 +619,7 @@ class LinuxHardware(Hardware):
d['rotational'] = get_file_content(sysdir + "/queue/rotational")
d['scheduler_mode'] = ""
scheduler = get_file_content(sysdir + "/queue/scheduler")
if scheduler is not None:
m = re.match(".*?(\[(.*)\])", scheduler)
if m:
d['scheduler_mode'] = m.group(2)

Loading…
Cancel
Save