try to fix storagecounter test in CI
This commit is contained in:
parent
fd6660aba1
commit
d3424c416d
@ -21,14 +21,14 @@ import os, json, base64
|
|||||||
import config, logger, netcontroller
|
import config, logger, netcontroller
|
||||||
from etc import onionrvalues
|
from etc import onionrvalues
|
||||||
from logger.settings import *
|
from logger.settings import *
|
||||||
|
from utils import readstatic
|
||||||
|
|
||||||
def setup_config():
|
def setup_config():
|
||||||
|
|
||||||
if not os.path.exists(config._configfile):
|
if not os.path.exists(config._configfile):
|
||||||
if os.path.exists('static-data/default_config.json'):
|
|
||||||
# this is the default config, it will be overwritten if a config file already exists. Else, it saves it
|
# this is the default config, it will be overwritten if a config file already exists. Else, it saves it
|
||||||
with open('static-data/default_config.json', 'r') as configReadIn:
|
conf_data = readstatic.read_static('default_config.json', ret_bin=False)
|
||||||
config.set_config(json.loads(configReadIn.read()))
|
config.set_config(json.loads(conf_data))
|
||||||
|
|
||||||
config.save()
|
config.save()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user