Merge pull request #24490 from aneeshusa/fix-pacman-list-upgrades

Fix pacman.list_upgrades for new python_shell default.
This commit is contained in:
Thomas S Hatch 2015-06-09 09:13:16 -06:00
commit 0247e8d10d

View File

@ -126,10 +126,7 @@ def list_upgrades(refresh=False):
if refresh: if refresh:
options.append('-y') options.append('-y')
cmd = ( cmd = ('pacman {0}').format(' '.join(options))
'pacman {0} | egrep -v '
r'"^\s|^:"'
).format(' '.join(options))
call = __salt__['cmd.run_all'](cmd, output_loglevel='trace') call = __salt__['cmd.run_all'](cmd, output_loglevel='trace')
@ -145,7 +142,9 @@ def list_upgrades(refresh=False):
else: else:
out = call['stdout'] out = call['stdout']
for line in out.splitlines(): output = iter(out.splitlines())
output.next() # Skip informational output line
for line in output:
comps = line.split(' ') comps = line.split(' ')
if len(comps) < 2: if len(comps) < 2:
continue continue