mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #3175 from jpmens/setup9
Protect None value in setup module (ansible 1.2)
This commit is contained in:
commit
39aa5e5eac
1 changed files with 4 additions and 3 deletions
|
@ -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…
Reference in a new issue