mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #25733 from davidjb/mount-fix
Avoid IndexError when listing mounts if mount output ends in newline
This commit is contained in:
commit
9817fc5556
@ -41,7 +41,8 @@ def _list_mounts():
|
||||
|
||||
for line in mounts.split('\n'):
|
||||
comps = re.sub(r"\s+", " ", line).split()
|
||||
ret[comps[2]] = comps[0]
|
||||
if len(comps) >= 3:
|
||||
ret[comps[2]] = comps[0]
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user