resolve python module circular dependency

This commit is contained in:
hroff-1902 2019-03-22 21:49:19 +03:00
parent 60afba5592
commit be6836b0ef

View File

@ -13,7 +13,6 @@ import sdnotify
from freqtrade import (constants, OperationalException, __version__)
from freqtrade.arguments import Arguments
from freqtrade.configuration import Configuration, set_loggers
from freqtrade.freqtradebot import FreqtradeBot
from freqtrade.state import State
from freqtrade.rpc import RPCMessageType
@ -83,6 +82,10 @@ class Worker(object):
# Load configuration
self._config = Configuration(self._args, None).get_config()
# Import freqtradebot here in order to avoid python circular
# dependency error, damn!
from freqtrade.freqtradebot import FreqtradeBot
# Init the instance of the bot
self.freqtrade = FreqtradeBot(self._config, self)