mirror of
https://github.com/basicswap/basicswap.git
synced 2024-12-23 03:49:25 +00:00
Move some default values to config.py
This commit is contained in:
parent
388ada154e
commit
0a2c6dafb7
8 changed files with 43 additions and 41 deletions
|
@ -376,7 +376,7 @@ class BasicSwap(BaseApp):
|
||||||
chain_client_settings = self.getChainClientSettings(coin)
|
chain_client_settings = self.getChainClientSettings(coin)
|
||||||
|
|
||||||
bindir = os.path.expanduser(chain_client_settings.get('bindir', ''))
|
bindir = os.path.expanduser(chain_client_settings.get('bindir', ''))
|
||||||
datadir = os.path.expanduser(chain_client_settings.get('datadir', os.path.join(cfg.DATADIRS, chainparams[coin]['name'])))
|
datadir = os.path.expanduser(chain_client_settings.get('datadir', os.path.join(cfg.TEST_DATADIRS, chainparams[coin]['name'])))
|
||||||
|
|
||||||
connection_type = chain_client_settings.get('connection_type', 'none')
|
connection_type = chain_client_settings.get('connection_type', 'none')
|
||||||
rpcauth = None
|
rpcauth = None
|
||||||
|
@ -2390,7 +2390,7 @@ class BasicSwap(BaseApp):
|
||||||
try:
|
try:
|
||||||
if 'lookups' in data:
|
if 'lookups' in data:
|
||||||
self.settings['chainclients'][coin_name]['chain_lookups'] = data['lookups']
|
self.settings['chainclients'][coin_name]['chain_lookups'] = data['lookups']
|
||||||
settings_path = os.path.join(self.data_dir, 'basicswap.json')
|
settings_path = os.path.join(self.data_dir, cfg.CONFIG_FILENAME)
|
||||||
shutil.copyfile(settings_path, settings_path + '.last')
|
shutil.copyfile(settings_path, settings_path + '.last')
|
||||||
with open(settings_path, 'w') as fp:
|
with open(settings_path, 'w') as fp:
|
||||||
json.dump(self.settings, fp, indent=4)
|
json.dump(self.settings, fp, indent=4)
|
||||||
|
|
|
@ -8,7 +8,9 @@ import os
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
DATADIRS = os.path.expanduser(os.getenv('DATADIRS', '/tmp/basicswap'))
|
CONFIG_FILENAME = 'basicswap.json'
|
||||||
|
DEFAULT_DATADIR = '~/.basicswap'
|
||||||
|
TEST_DATADIRS = os.path.expanduser(os.getenv('DATADIRS', '/tmp/basicswap'))
|
||||||
|
|
||||||
PARTICL_BINDIR = os.path.expanduser(os.getenv('PARTICL_BINDIR', ''))
|
PARTICL_BINDIR = os.path.expanduser(os.getenv('PARTICL_BINDIR', ''))
|
||||||
PARTICLD = os.getenv('PARTICLD', 'particld' + ('.exe' if os.name == 'nt' else ''))
|
PARTICLD = os.getenv('PARTICLD', 'particld' + ('.exe' if os.name == 'nt' else ''))
|
||||||
|
|
|
@ -249,7 +249,7 @@ def printHelp():
|
||||||
logger.info('Usage: basicswap-prepare ')
|
logger.info('Usage: basicswap-prepare ')
|
||||||
logger.info('\n--help, -h Print help.')
|
logger.info('\n--help, -h Print help.')
|
||||||
logger.info('--version, -v Print version.')
|
logger.info('--version, -v Print version.')
|
||||||
logger.info('--datadir=PATH Path to basicswap data directory, default:~/.basicswap.')
|
logger.info('--datadir=PATH Path to basicswap data directory, default:{}.'.format(cfg.DEFAULT_DATADIR))
|
||||||
logger.info('--bindir=PATH Path to cores directory, default:datadir/bin.')
|
logger.info('--bindir=PATH Path to cores directory, default:datadir/bin.')
|
||||||
logger.info('--mainnet Run in mainnet mode.')
|
logger.info('--mainnet Run in mainnet mode.')
|
||||||
logger.info('--testnet Run in testnet mode.')
|
logger.info('--testnet Run in testnet mode.')
|
||||||
|
@ -374,8 +374,7 @@ def main():
|
||||||
exitWithError('Unknown argument {}'.format(v))
|
exitWithError('Unknown argument {}'.format(v))
|
||||||
|
|
||||||
if data_dir is None:
|
if data_dir is None:
|
||||||
default_datadir = '~/.basicswap'
|
data_dir = os.path.join(os.path.expanduser(cfg.DEFAULT_DATADIR))
|
||||||
data_dir = os.path.join(os.path.expanduser(default_datadir))
|
|
||||||
if bin_dir is None:
|
if bin_dir is None:
|
||||||
bin_dir = os.path.join(data_dir, 'bin')
|
bin_dir = os.path.join(data_dir, 'bin')
|
||||||
|
|
||||||
|
@ -387,7 +386,7 @@ def main():
|
||||||
|
|
||||||
if not os.path.exists(data_dir):
|
if not os.path.exists(data_dir):
|
||||||
os.makedirs(data_dir)
|
os.makedirs(data_dir)
|
||||||
config_path = os.path.join(data_dir, 'basicswap.json')
|
config_path = os.path.join(data_dir, cfg.CONFIG_FILENAME)
|
||||||
|
|
||||||
withchainclients = {}
|
withchainclients = {}
|
||||||
chainclients = {
|
chainclients = {
|
||||||
|
|
|
@ -19,6 +19,7 @@ import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import basicswap.config as cfg
|
||||||
from basicswap import __version__
|
from basicswap import __version__
|
||||||
from basicswap.basicswap import BasicSwap
|
from basicswap.basicswap import BasicSwap
|
||||||
from basicswap.http_server import HttpThread
|
from basicswap.http_server import HttpThread
|
||||||
|
@ -50,7 +51,7 @@ def startDaemon(node_dir, bin_dir, daemon_bin, opts=[]):
|
||||||
|
|
||||||
def runClient(fp, data_dir, chain):
|
def runClient(fp, data_dir, chain):
|
||||||
global swap_client
|
global swap_client
|
||||||
settings_path = os.path.join(data_dir, 'basicswap.json')
|
settings_path = os.path.join(data_dir, cfg.CONFIG_FILENAME)
|
||||||
pids_path = os.path.join(data_dir, '.pids')
|
pids_path = os.path.join(data_dir, '.pids')
|
||||||
|
|
||||||
if not os.path.exists(settings_path):
|
if not os.path.exists(settings_path):
|
||||||
|
@ -153,7 +154,7 @@ def printHelp():
|
||||||
logger.info('Usage: basicswap-run ')
|
logger.info('Usage: basicswap-run ')
|
||||||
logger.info('\n--help, -h Print help.')
|
logger.info('\n--help, -h Print help.')
|
||||||
logger.info('--version, -v Print version.')
|
logger.info('--version, -v Print version.')
|
||||||
logger.info('--datadir=PATH Path to basicswap data directory, default:~/.basicswap.')
|
logger.info('--datadir=PATH Path to basicswap data directory, default:{}.'.format(cfg.DEFAULT_DATADIR))
|
||||||
logger.info('--mainnet Run in mainnet mode.')
|
logger.info('--mainnet Run in mainnet mode.')
|
||||||
logger.info('--testnet Run in testnet mode.')
|
logger.info('--testnet Run in testnet mode.')
|
||||||
logger.info('--regtest Run in regtest mode.')
|
logger.info('--regtest Run in regtest mode.')
|
||||||
|
@ -197,8 +198,7 @@ def main():
|
||||||
logger.warning('Unknown argument %s', v)
|
logger.warning('Unknown argument %s', v)
|
||||||
|
|
||||||
if data_dir is None:
|
if data_dir is None:
|
||||||
default_datadir = '~/.basicswap'
|
data_dir = os.path.join(os.path.expanduser(cfg.DEFAULT_DATADIR))
|
||||||
data_dir = os.path.join(os.path.expanduser(default_datadir))
|
|
||||||
logger.info('Using datadir: %s', data_dir)
|
logger.info('Using datadir: %s', data_dir)
|
||||||
logger.info('Chain: %s', chain)
|
logger.info('Chain: %s', chain)
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ def prepareDir(datadir, nodeId, network_key, network_pubkey):
|
||||||
|
|
||||||
nmcdatadir = os.path.join(datadir, str(NMC_NODE))
|
nmcdatadir = os.path.join(datadir, str(NMC_NODE))
|
||||||
btcdatadir = os.path.join(datadir, str(BTC_NODE))
|
btcdatadir = os.path.join(datadir, str(BTC_NODE))
|
||||||
settings_path = os.path.join(basicswap_dir, 'basicswap.json')
|
settings_path = os.path.join(basicswap_dir, cfg.CONFIG_FILENAME)
|
||||||
settings = {
|
settings = {
|
||||||
'zmqhost': 'tcp://127.0.0.1',
|
'zmqhost': 'tcp://127.0.0.1',
|
||||||
'zmqport': BASE_ZMQ_PORT + nodeId,
|
'zmqport': BASE_ZMQ_PORT + nodeId,
|
||||||
|
@ -171,7 +171,7 @@ def prepareDir(datadir, nodeId, network_key, network_pubkey):
|
||||||
|
|
||||||
|
|
||||||
def startDaemon(nodeId, bin_dir=cfg.PARTICL_BINDIR, daemon_bin=cfg.PARTICLD):
|
def startDaemon(nodeId, bin_dir=cfg.PARTICL_BINDIR, daemon_bin=cfg.PARTICLD):
|
||||||
node_dir = os.path.join(cfg.DATADIRS, str(nodeId))
|
node_dir = os.path.join(cfg.TEST_DATADIRS, str(nodeId))
|
||||||
daemon_bin = os.path.join(bin_dir, daemon_bin)
|
daemon_bin = os.path.join(bin_dir, daemon_bin)
|
||||||
|
|
||||||
args = [daemon_bin, '-datadir=' + node_dir]
|
args = [daemon_bin, '-datadir=' + node_dir]
|
||||||
|
@ -180,15 +180,15 @@ def startDaemon(nodeId, bin_dir=cfg.PARTICL_BINDIR, daemon_bin=cfg.PARTICLD):
|
||||||
|
|
||||||
|
|
||||||
def partRpc(cmd, node_id=0):
|
def partRpc(cmd, node_id=0):
|
||||||
return callrpc_cli(cfg.PARTICL_BINDIR, os.path.join(cfg.DATADIRS, str(node_id)), 'regtest', cmd, cfg.PARTICL_CLI)
|
return callrpc_cli(cfg.PARTICL_BINDIR, os.path.join(cfg.TEST_DATADIRS, str(node_id)), 'regtest', cmd, cfg.PARTICL_CLI)
|
||||||
|
|
||||||
|
|
||||||
def btcRpc(cmd):
|
def btcRpc(cmd):
|
||||||
return callrpc_cli(cfg.BITCOIN_BINDIR, os.path.join(cfg.DATADIRS, str(BTC_NODE)), 'regtest', cmd, cfg.BITCOIN_CLI)
|
return callrpc_cli(cfg.BITCOIN_BINDIR, os.path.join(cfg.TEST_DATADIRS, str(BTC_NODE)), 'regtest', cmd, cfg.BITCOIN_CLI)
|
||||||
|
|
||||||
|
|
||||||
def nmcRpc(cmd):
|
def nmcRpc(cmd):
|
||||||
return callrpc_cli(cfg.NAMECOIN_BINDIR, os.path.join(cfg.DATADIRS, str(NMC_NODE)), 'regtest', cmd, cfg.NAMECOIN_CLI)
|
return callrpc_cli(cfg.NAMECOIN_BINDIR, os.path.join(cfg.TEST_DATADIRS, str(NMC_NODE)), 'regtest', cmd, cfg.NAMECOIN_CLI)
|
||||||
|
|
||||||
|
|
||||||
def signal_handler(sig, frame):
|
def signal_handler(sig, frame):
|
||||||
|
@ -228,15 +228,15 @@ class Test(unittest.TestCase):
|
||||||
cls.network_key = toWIF(PREFIX_SECRET_KEY_REGTEST, eckey.get_bytes())
|
cls.network_key = toWIF(PREFIX_SECRET_KEY_REGTEST, eckey.get_bytes())
|
||||||
cls.network_pubkey = eckey.get_pubkey().get_bytes().hex()
|
cls.network_pubkey = eckey.get_pubkey().get_bytes().hex()
|
||||||
|
|
||||||
if os.path.isdir(cfg.DATADIRS):
|
if os.path.isdir(cfg.TEST_DATADIRS):
|
||||||
logging.info('Removing ' + cfg.DATADIRS)
|
logging.info('Removing ' + cfg.TEST_DATADIRS)
|
||||||
shutil.rmtree(cfg.DATADIRS)
|
shutil.rmtree(cfg.TEST_DATADIRS)
|
||||||
|
|
||||||
for i in range(NUM_NODES):
|
for i in range(NUM_NODES):
|
||||||
prepareDir(cfg.DATADIRS, i, cls.network_key, cls.network_pubkey)
|
prepareDir(cfg.TEST_DATADIRS, i, cls.network_key, cls.network_pubkey)
|
||||||
|
|
||||||
prepareOtherDir(cfg.DATADIRS, NMC_NODE)
|
prepareOtherDir(cfg.TEST_DATADIRS, NMC_NODE)
|
||||||
prepareOtherDir(cfg.DATADIRS, BTC_NODE, 'bitcoin.conf')
|
prepareOtherDir(cfg.TEST_DATADIRS, BTC_NODE, 'bitcoin.conf')
|
||||||
|
|
||||||
cls.daemons = []
|
cls.daemons = []
|
||||||
cls.swap_clients = []
|
cls.swap_clients = []
|
||||||
|
@ -251,8 +251,8 @@ class Test(unittest.TestCase):
|
||||||
logging.info('Started %s %d', cfg.PARTICLD, cls.daemons[-1].pid)
|
logging.info('Started %s %d', cfg.PARTICLD, cls.daemons[-1].pid)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
for i in range(NUM_NODES):
|
for i in range(NUM_NODES):
|
||||||
basicswap_dir = os.path.join(os.path.join(cfg.DATADIRS, str(i)), 'basicswap')
|
basicswap_dir = os.path.join(os.path.join(cfg.TEST_DATADIRS, str(i)), 'basicswap')
|
||||||
settings_path = os.path.join(basicswap_dir, 'basicswap.json')
|
settings_path = os.path.join(basicswap_dir, cfg.CONFIG_FILENAME)
|
||||||
with open(settings_path) as fs:
|
with open(settings_path) as fs:
|
||||||
settings = json.load(fs)
|
settings = json.load(fs)
|
||||||
fp = open(os.path.join(basicswap_dir, 'basicswap.log'), 'w')
|
fp = open(os.path.join(basicswap_dir, 'basicswap.log'), 'w')
|
||||||
|
|
|
@ -14,6 +14,7 @@ import logging
|
||||||
import shutil
|
import shutil
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
import basicswap.config as cfg
|
||||||
import bin.basicswap_prepare as prepareSystem
|
import bin.basicswap_prepare as prepareSystem
|
||||||
test_path = os.path.expanduser(os.getenv('TEST_PREPARE_PATH', '~/test_basicswap'))
|
test_path = os.path.expanduser(os.getenv('TEST_PREPARE_PATH', '~/test_basicswap'))
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ class Test(unittest.TestCase):
|
||||||
with patch.object(sys, 'argv', testargs):
|
with patch.object(sys, 'argv', testargs):
|
||||||
prepareSystem.main()
|
prepareSystem.main()
|
||||||
|
|
||||||
config_path = os.path.join(test_path, 'basicswap.json')
|
config_path = os.path.join(test_path, cfg.CONFIG_FILENAME)
|
||||||
self.assertTrue(os.path.exists(config_path))
|
self.assertTrue(os.path.exists(config_path))
|
||||||
|
|
||||||
logger.info('Test no overwrite')
|
logger.info('Test no overwrite')
|
||||||
|
|
|
@ -35,6 +35,7 @@ from basicswap.util import (
|
||||||
callrpc_cli,
|
callrpc_cli,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import basicswap.config as cfg
|
||||||
import bin.basicswap_prepare as prepareSystem
|
import bin.basicswap_prepare as prepareSystem
|
||||||
import bin.basicswap_run as runSystem
|
import bin.basicswap_run as runSystem
|
||||||
|
|
||||||
|
@ -113,7 +114,7 @@ class Test(unittest.TestCase):
|
||||||
|
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
client_path = os.path.join(test_path, 'client{}'.format(i))
|
client_path = os.path.join(test_path, 'client{}'.format(i))
|
||||||
config_path = os.path.join(client_path, 'basicswap.json')
|
config_path = os.path.join(client_path, cfg.CONFIG_FILENAME)
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(client_path)
|
shutil.rmtree(client_path)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
|
|
@ -25,6 +25,7 @@ import signal
|
||||||
import threading
|
import threading
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
|
import basicswap.config as cfg
|
||||||
from basicswap.basicswap import (
|
from basicswap.basicswap import (
|
||||||
BasicSwap,
|
BasicSwap,
|
||||||
Coins,
|
Coins,
|
||||||
|
@ -46,8 +47,6 @@ from basicswap.http_server import (
|
||||||
HttpThread,
|
HttpThread,
|
||||||
)
|
)
|
||||||
|
|
||||||
import basicswap.config as cfg
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
logger.level = logging.DEBUG
|
logger.level = logging.DEBUG
|
||||||
if not len(logger.handlers):
|
if not len(logger.handlers):
|
||||||
|
@ -130,7 +129,7 @@ def prepareDir(datadir, nodeId, network_key, network_pubkey):
|
||||||
|
|
||||||
ltcdatadir = os.path.join(datadir, str(LTC_NODE))
|
ltcdatadir = os.path.join(datadir, str(LTC_NODE))
|
||||||
btcdatadir = os.path.join(datadir, str(BTC_NODE))
|
btcdatadir = os.path.join(datadir, str(BTC_NODE))
|
||||||
settings_path = os.path.join(basicswap_dir, 'basicswap.json')
|
settings_path = os.path.join(basicswap_dir, cfg.CONFIG_FILENAME)
|
||||||
settings = {
|
settings = {
|
||||||
'zmqhost': 'tcp://127.0.0.1',
|
'zmqhost': 'tcp://127.0.0.1',
|
||||||
'zmqport': BASE_ZMQ_PORT + nodeId,
|
'zmqport': BASE_ZMQ_PORT + nodeId,
|
||||||
|
@ -176,7 +175,7 @@ def prepareDir(datadir, nodeId, network_key, network_pubkey):
|
||||||
|
|
||||||
|
|
||||||
def startDaemon(nodeId, bin_dir=cfg.PARTICL_BINDIR, daemon_bin=cfg.PARTICLD):
|
def startDaemon(nodeId, bin_dir=cfg.PARTICL_BINDIR, daemon_bin=cfg.PARTICLD):
|
||||||
node_dir = os.path.join(cfg.DATADIRS, str(nodeId))
|
node_dir = os.path.join(cfg.TEST_DATADIRS, str(nodeId))
|
||||||
daemon_bin = os.path.join(bin_dir, daemon_bin)
|
daemon_bin = os.path.join(bin_dir, daemon_bin)
|
||||||
|
|
||||||
args = [daemon_bin, '-datadir=' + node_dir]
|
args = [daemon_bin, '-datadir=' + node_dir]
|
||||||
|
@ -185,15 +184,15 @@ def startDaemon(nodeId, bin_dir=cfg.PARTICL_BINDIR, daemon_bin=cfg.PARTICLD):
|
||||||
|
|
||||||
|
|
||||||
def partRpc(cmd, node_id=0):
|
def partRpc(cmd, node_id=0):
|
||||||
return callrpc_cli(cfg.PARTICL_BINDIR, os.path.join(cfg.DATADIRS, str(node_id)), 'regtest', cmd, cfg.PARTICL_CLI)
|
return callrpc_cli(cfg.PARTICL_BINDIR, os.path.join(cfg.TEST_DATADIRS, str(node_id)), 'regtest', cmd, cfg.PARTICL_CLI)
|
||||||
|
|
||||||
|
|
||||||
def btcRpc(cmd):
|
def btcRpc(cmd):
|
||||||
return callrpc_cli(cfg.BITCOIN_BINDIR, os.path.join(cfg.DATADIRS, str(BTC_NODE)), 'regtest', cmd, cfg.BITCOIN_CLI)
|
return callrpc_cli(cfg.BITCOIN_BINDIR, os.path.join(cfg.TEST_DATADIRS, str(BTC_NODE)), 'regtest', cmd, cfg.BITCOIN_CLI)
|
||||||
|
|
||||||
|
|
||||||
def ltcRpc(cmd):
|
def ltcRpc(cmd):
|
||||||
return callrpc_cli(cfg.LITECOIN_BINDIR, os.path.join(cfg.DATADIRS, str(LTC_NODE)), 'regtest', cmd, cfg.LITECOIN_CLI)
|
return callrpc_cli(cfg.LITECOIN_BINDIR, os.path.join(cfg.TEST_DATADIRS, str(LTC_NODE)), 'regtest', cmd, cfg.LITECOIN_CLI)
|
||||||
|
|
||||||
|
|
||||||
def signal_handler(sig, frame):
|
def signal_handler(sig, frame):
|
||||||
|
@ -242,15 +241,15 @@ class Test(unittest.TestCase):
|
||||||
cls.network_key = toWIF(PREFIX_SECRET_KEY_REGTEST, eckey.get_bytes())
|
cls.network_key = toWIF(PREFIX_SECRET_KEY_REGTEST, eckey.get_bytes())
|
||||||
cls.network_pubkey = eckey.get_pubkey().get_bytes().hex()
|
cls.network_pubkey = eckey.get_pubkey().get_bytes().hex()
|
||||||
|
|
||||||
if os.path.isdir(cfg.DATADIRS):
|
if os.path.isdir(cfg.TEST_DATADIRS):
|
||||||
logging.info('Removing ' + cfg.DATADIRS)
|
logging.info('Removing ' + cfg.TEST_DATADIRS)
|
||||||
shutil.rmtree(cfg.DATADIRS)
|
shutil.rmtree(cfg.TEST_DATADIRS)
|
||||||
|
|
||||||
for i in range(NUM_NODES):
|
for i in range(NUM_NODES):
|
||||||
prepareDir(cfg.DATADIRS, i, cls.network_key, cls.network_pubkey)
|
prepareDir(cfg.TEST_DATADIRS, i, cls.network_key, cls.network_pubkey)
|
||||||
|
|
||||||
prepareOtherDir(cfg.DATADIRS, LTC_NODE)
|
prepareOtherDir(cfg.TEST_DATADIRS, LTC_NODE)
|
||||||
prepareOtherDir(cfg.DATADIRS, BTC_NODE, 'bitcoin.conf')
|
prepareOtherDir(cfg.TEST_DATADIRS, BTC_NODE, 'bitcoin.conf')
|
||||||
|
|
||||||
cls.daemons = []
|
cls.daemons = []
|
||||||
cls.swap_clients = []
|
cls.swap_clients = []
|
||||||
|
@ -265,8 +264,8 @@ class Test(unittest.TestCase):
|
||||||
logging.info('Started %s %d', cfg.PARTICLD, cls.daemons[-1].pid)
|
logging.info('Started %s %d', cfg.PARTICLD, cls.daemons[-1].pid)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
for i in range(NUM_NODES):
|
for i in range(NUM_NODES):
|
||||||
basicswap_dir = os.path.join(os.path.join(cfg.DATADIRS, str(i)), 'basicswap')
|
basicswap_dir = os.path.join(os.path.join(cfg.TEST_DATADIRS, str(i)), 'basicswap')
|
||||||
settings_path = os.path.join(basicswap_dir, 'basicswap.json')
|
settings_path = os.path.join(basicswap_dir, cfg.CONFIG_FILENAME)
|
||||||
with open(settings_path) as fs:
|
with open(settings_path) as fs:
|
||||||
settings = json.load(fs)
|
settings = json.load(fs)
|
||||||
fp = open(os.path.join(basicswap_dir, 'basicswap.log'), 'w')
|
fp = open(os.path.join(basicswap_dir, 'basicswap.log'), 'w')
|
||||||
|
|
Loading…
Reference in a new issue