mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +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:
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user