From 854802122c2a0f3f6cdc4b2905d118bf387739c1 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Wed, 18 Sep 2013 16:55:19 +0000 Subject: [PATCH] fix error to create a wallet due to missing pick_random_server decl --- lib/__init__.py | 2 +- lib/interface.py | 4 ---- lib/network.py | 3 +++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/__init__.py b/lib/__init__.py index fe4c7b3..1042ccd 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -3,7 +3,7 @@ from util import format_satoshis, print_msg, print_json, print_error, set_verbos from wallet import WalletSynchronizer, WalletStorage from wallet_factory import WalletFactory as Wallet from verifier import TxVerifier -from network import Network, DEFAULT_SERVERS, DEFAULT_PORTS +from network import Network, DEFAULT_SERVERS, DEFAULT_PORTS, pick_random_server from interface import Interface from simple_config import SimpleConfig import bitcoin diff --git a/lib/interface.py b/lib/interface.py index 97d1ac2..3c72098 100644 --- a/lib/interface.py +++ b/lib/interface.py @@ -28,10 +28,6 @@ DEFAULT_TIMEOUT = 5 proxy_modes = ['socks4', 'socks5', 'http'] -def pick_random_server(): - return random.choice( filter_protocol(DEFAULT_SERVERS,'s') ) - - class Interface(threading.Thread): diff --git a/lib/network.py b/lib/network.py index a1b0f8a..cad651e 100644 --- a/lib/network.py +++ b/lib/network.py @@ -33,6 +33,9 @@ def filter_protocol(servers, p): return l +def pick_random_server(): + return random.choice( filter_protocol(DEFAULT_SERVERS,'s') ) + class Network(threading.Thread): -- 1.7.1