fix indexing error

both the existing code and my addition erroneously strip the first result from the semodule call
This commit is contained in:
David J. Haines 2016-11-16 16:16:41 -05:00 committed by GitHub
parent 4e49c1e991
commit 516a67e6a3

View file

@ -249,7 +249,7 @@ def list_semod():
if semodule_version == 'new':
mdata = __salt__['cmd.run']('semodule -lfull').splitlines()
ret = {}
for line in mdata[1:]:
for line in mdata[0:]:
if not line.strip():
continue
comps = line.split()
@ -262,7 +262,7 @@ def list_semod():
else:
mdata = __salt__['cmd.run']('semodule -l').splitlines()
ret = {}
for line in mdata[1:]:
for line in mdata[0:]:
if not line.strip():
continue
comps = line.split()