mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 10:28:10 +01:00
ui: Split wallet page
This commit is contained in:
@@ -12,6 +12,7 @@ import mmap
|
||||
import stat
|
||||
import gnupg
|
||||
import signal
|
||||
import socket
|
||||
import hashlib
|
||||
import tarfile
|
||||
import zipfile
|
||||
@@ -114,7 +115,12 @@ def downloadFile(url, path):
|
||||
opener = urllib.request.build_opener()
|
||||
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
|
||||
urllib.request.install_opener(opener)
|
||||
|
||||
# Set one second timeout for urlretrieve connections
|
||||
old_timeout = socket.getdefaulttimeout()
|
||||
socket.setdefaulttimeout(1)
|
||||
urlretrieve(url, path, make_reporthook())
|
||||
socket.setdefaulttimeout(old_timeout)
|
||||
|
||||
|
||||
def extractCore(coin, version_pair, settings, bin_dir, release_path):
|
||||
|
||||
@@ -158,7 +158,7 @@ def runClient(fp, data_dir, chain):
|
||||
swap_client.start()
|
||||
|
||||
if 'htmlhost' in settings:
|
||||
swap_client.log.info('Starting server at %s:%d.' % (settings['htmlhost'], settings['htmlport']))
|
||||
swap_client.log.info('Starting server at http://%s:%d.' % (settings['htmlhost'], settings['htmlport']))
|
||||
allow_cors = settings['allowcors'] if 'allowcors' in settings else cfg.DEFAULT_ALLOW_CORS
|
||||
tS1 = HttpThread(fp, settings['htmlhost'], settings['htmlport'], allow_cors, swap_client)
|
||||
threads.append(tS1)
|
||||
|
||||
Reference in New Issue
Block a user