remove code duplicates

This commit is contained in:
gcarq
2017-11-17 17:54:31 +01:00
parent 8655c6c264
commit bdff29a472
4 changed files with 35 additions and 23 deletions

View File

@@ -11,14 +11,14 @@ from typing import Dict, Optional, List
import requests
from cachetools import cached, TTLCache
from jsonschema import validate
from freqtrade import __version__, exchange, persistence
from freqtrade.analyze import get_signal, SignalType
from freqtrade.misc import CONF_SCHEMA, State, get_state, update_state, parse_args, throttle
from freqtrade.misc import (
FreqtradeException
)
from freqtrade.misc import State, get_state, update_state, parse_args, throttle, \
load_config
from freqtrade.persistence import Trade
from freqtrade.rpc import telegram
@@ -335,12 +335,7 @@ def main():
)
# Load and validate configuration
with open(args.config) as file:
_CONF = json.load(file)
if 'internals' not in _CONF:
_CONF['internals'] = {}
logger.info('Validating configuration ...')
validate(_CONF, CONF_SCHEMA)
_CONF = load_config(args.config)
# Initialize all modules and start main loop
if args.dynamic_whitelist: