commit 6fda3733e4ca86625b3534efe93e581b3f85bf22
parent 7f58e23ed98a9ee4b71c70a6e30c7bdb3094f23b
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 12 Sep 2017 15:06:00 +0200
Merge branch 'master' of github.com:spesmilo/electrum
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/network.py b/lib/network.py
@@ -982,10 +982,10 @@ class Network(util.DaemonThread):
filename = b.path()
def download_thread():
try:
- import urllib, socket
+ import urllib.request, socket
socket.setdefaulttimeout(30)
self.print_error("downloading ", bitcoin.HEADERS_URL)
- urllib.urlretrieve(bitcoin.HEADERS_URL, filename + '.tmp')
+ urllib.request.urlretrieve(bitcoin.HEADERS_URL, filename + '.tmp')
os.rename(filename + '.tmp', filename)
self.print_error("done.")
except Exception:
diff --git a/lib/transaction.py b/lib/transaction.py
@@ -591,6 +591,8 @@ class Transaction:
return addr
elif output_type == TYPE_ADDRESS:
return bitcoin.address_to_script(addr)
+ elif output_type == TYPE_PUBKEY:
+ return addr
else:
raise TypeError('Unknown output type')
return script