mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Move set_loggers to main()
This commit is contained in:
parent
6451feee0e
commit
7406edfd8f
|
@ -11,5 +11,4 @@ import sys
|
|||
from freqtrade import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main.set_loggers()
|
||||
main.main(sys.argv[1:])
|
||||
|
|
|
@ -28,7 +28,24 @@ def main(sysargv: List[str]) -> None:
|
|||
This function will initiate the bot and start the trading loop.
|
||||
:return: None
|
||||
"""
|
||||
set_loggers()
|
||||
arguments = Arguments(
|
||||
sysargv,
|
||||
'Free, open source crypto trading bot'
|
||||
)
|
||||
args: Namespace = arguments.get_parsed_arg()
|
||||
|
||||
# A subcommand has been issued.
|
||||
# Means if Backtesting or Hyperopt have been called we exit the bot
|
||||
if hasattr(args, 'func'):
|
||||
args.func(args)
|
||||
return
|
||||
|
||||
worker = None
|
||||
return_code = 1
|
||||
try:
|
||||
set_loggers()
|
||||
|
||||
worker = None
|
||||
return_code = 1
|
||||
|
||||
|
@ -64,5 +81,4 @@ def main(sysargv: List[str]) -> None:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
set_loggers()
|
||||
main(sys.argv[1:])
|
||||
|
|
Loading…
Reference in New Issue
Block a user