mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #24490 from aneeshusa/fix-pacman-list-upgrades
Fix pacman.list_upgrades for new python_shell default.
This commit is contained in:
commit
0247e8d10d
@ -126,10 +126,7 @@ def list_upgrades(refresh=False):
|
||||
if refresh:
|
||||
options.append('-y')
|
||||
|
||||
cmd = (
|
||||
'pacman {0} | egrep -v '
|
||||
r'"^\s|^:"'
|
||||
).format(' '.join(options))
|
||||
cmd = ('pacman {0}').format(' '.join(options))
|
||||
|
||||
call = __salt__['cmd.run_all'](cmd, output_loglevel='trace')
|
||||
|
||||
@ -145,7 +142,9 @@ def list_upgrades(refresh=False):
|
||||
else:
|
||||
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(' ')
|
||||
if len(comps) < 2:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user