Skip to content

Commit

Permalink
Added exit_code attribute to SignalException and ErrorReturnCode exce…
Browse files Browse the repository at this point in the history
…ption classes. closes #127
  • Loading branch information
Andrew Moffat committed Feb 14, 2013
1 parent 755b977 commit 4fe3a08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.09 -

* Added exit_code attribute to SignalException and ErrorReturnCode exception
classes.

## 1.08 - 1/29/12

Expand Down
4 changes: 2 additions & 2 deletions sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ def get_rc_exc(rc):

if rc > 0:
name = "ErrorReturnCode_%d" % rc
exc = type(name, (ErrorReturnCode,), {})
exc = type(name, (ErrorReturnCode,), {"exit_code": rc})
else:
name = "SignalException_%d" % abs(rc)
exc = type(name, (SignalException,), {})
exc = type(name, (SignalException,), {"exit_code": rc})

rc_exc_cache[rc] = exc
return exc
Expand Down

0 comments on commit 4fe3a08

Please sign in to comment.