electrum

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

commit c7b33a9e4a2956b79356e6e3c2fb1e192f731097
parent 20ee265683a637ef12950a26ace0ada99fb7868c
Author: ThomasV <electrumdev@gmail.com>
Date:   Fri, 22 May 2015 07:34:40 +0200

Merge pull request #1228 from kyuupichan/net-interfaces

Add documentation string.  Fix uninitialized f error.
Diffstat:
Mlib/network.py | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/network.py b/lib/network.py @@ -122,6 +122,14 @@ def serialize_server(host, port, protocol): class Network(util.DaemonThread): + """The Network class manages a set of connections to remote + electrum servers, each connection is handled by its own + thread object returned from Interface(). Its external API: + + - Member functions get_header(), get_parameters(), get_status_value(), + new_blockchain_height(), set_parameters(), start(), + stop() + """ def __init__(self, pipe, config=None): if config is None: @@ -467,10 +475,9 @@ class Network(util.DaemonThread): out = {'id':_id} try: f = getattr(self, method[8:]) + out['result'] = f(*params) except AttributeError: out['error'] = "unknown method" - try: - out['result'] = f(*params) except BaseException as e: out['error'] = str(e) traceback.print_exc(file=sys.stdout)