electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 78488ebcbf98cc5bf537d67dcf7c26845c90c2f5
parent 4360a785add13de55e13437bd722d27b91729344
Author: SomberNight <somber.night@protonmail.com>
Date:   Sun, 16 Sep 2018 22:17:20 +0200

aiosafe safety belts

traceback.print_exc was raising, and self.exception did not got set,
and the whole trace was lost. arghhhh

Diffstat:
Melectrum/util.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/electrum/util.py b/electrum/util.py @@ -842,9 +842,12 @@ def aiosafe(f): except asyncio.CancelledError as e: self.exception = e except BaseException as e: - self.print_error("Exception in", f.__name__, ":", e.__class__.__name__, str(e)) - traceback.print_exc(file=sys.stderr) self.exception = e + self.print_error("Exception in", f.__name__, ":", e.__class__.__name__, str(e)) + try: + traceback.print_exc(file=sys.stderr) + except BaseException as e2: + self.print_error("aiosafe:traceback.print_exc raised: {}... original exc: {}".format(e2, e)) return f2 TxMinedStatus = NamedTuple("TxMinedStatus", [("height", int),