Skip to content

Commit

Permalink
Formalize attributes for InProgressAborted exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jtackaberry committed May 31, 2012
1 parent de627cc commit 5131c81
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ class InProgressAborted(BaseException):
and SystemExit, and also (for slightly different reasons) GeneratorExit,
which as of Python 2.6 also subclasses BaseException.
"""
pass
def __init__(self, *args, **kwargs):
super(InProgressAborted, self).__init__(*args)
self.message = args[0] if args else None
self.inprogress = kwargs.get('inprogress')
self.origin = kwargs.get('origin')

def __inprogress__(self):
# Support kaa.inprogress(exc)
return self.inprogress


class SocketError(Exception):
Expand Down

0 comments on commit 5131c81

Please sign in to comment.