diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2013-01-03 01:42:32 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2013-01-03 01:42:32 +0400 |
commit | 19cf31ada3ff3c669d28c960a09df2fbacb9acbe (patch) | |
tree | a2829bf8fa6ae65f94d976a9b972b0faff15c8e0 | |
parent | 39f0b6a54f86a6a205a87482e0795ac76f77a48b (diff) |
fix showing pending traceback
-rw-r--r-- | nbxmpp/dispatcher_nb.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/nbxmpp/dispatcher_nb.py b/nbxmpp/dispatcher_nb.py index 65bfc53..0544f4d 100644 --- a/nbxmpp/dispatcher_nb.py +++ b/nbxmpp/dispatcher_nb.py @@ -222,9 +222,8 @@ class XMPPDispatcher(PlugIn): handler(self) if len(self._pendingExceptions) > 0: _pendingException = self._pendingExceptions.pop() - e = _pendingException[0](_pendingException[1]) - e.__traceback__ = _pendingException[2] - raise e + sys.excepthook(*_pendingException) + return try: self.Stream.Parse(data) # end stream:stream tag received @@ -241,9 +240,8 @@ class XMPPDispatcher(PlugIn): return 0 if len(self._pendingExceptions) > 0: _pendingException = self._pendingExceptions.pop() - e = _pendingException[0](_pendingException[1]) - e.__traceback__ = _pendingException[2] - raise e + sys.excepthook(*_pendingException) + return if len(data) == 0: return '0' return len(data) |