mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 15:31:31 +00:00
fix download failed blockchain headers
This commit is contained in:
parent
70af22c9e4
commit
0791b469e7
1 changed files with 2 additions and 2 deletions
|
@ -982,10 +982,10 @@ class Network(util.DaemonThread):
|
||||||
filename = b.path()
|
filename = b.path()
|
||||||
def download_thread():
|
def download_thread():
|
||||||
try:
|
try:
|
||||||
import urllib, socket
|
import urllib.request, socket
|
||||||
socket.setdefaulttimeout(30)
|
socket.setdefaulttimeout(30)
|
||||||
self.print_error("downloading ", bitcoin.HEADERS_URL)
|
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)
|
os.rename(filename + '.tmp', filename)
|
||||||
self.print_error("done.")
|
self.print_error("done.")
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Add table
Reference in a new issue