Skip to content

Commit

Permalink
Populate __context__ with retcode; Fixes issue #5518
Browse files Browse the repository at this point in the history
  • Loading branch information
naiyt authored and basepi committed Jul 29, 2013
1 parent 2a86594 commit 2512d6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions salt/modules/cmdmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ def _run(cmd,
ret['stderr'] = err
ret['pid'] = proc.process.pid
ret['retcode'] = proc.process.returncode
try:
__context__['retcode'] = ret['retcode']
except NameError:
# Ignore the context error during grain generation
pass
return ret


Expand Down

0 comments on commit 2512d6c

Please sign in to comment.