Skip to content

Commit

Permalink
Merge pull request #24490 from aneeshusa/fix-pacman-list-upgrades
Browse files Browse the repository at this point in the history
Fix pacman.list_upgrades for new python_shell default.
  • Loading branch information
thatch45 committed Jun 9, 2015
2 parents 6268ddb + 980e1cb commit 0247e8d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions salt/modules/pacman.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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
Expand Down

0 comments on commit 0247e8d

Please sign in to comment.