let parse_args only parse, no continuation
This removes parse_args() from the call stack It pushes down the test-mocking one level [from parse_args() to main()]. Moves parse_args into a more generic 'modules' parsing direction.
This commit is contained in:
@@ -399,15 +399,18 @@ def cleanup() -> None:
|
||||
exit(0)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
def main(sysargv=sys.argv[1:]) -> None:
|
||||
"""
|
||||
Loads and validates the config and handles the main loop
|
||||
:return: None
|
||||
"""
|
||||
global _CONF
|
||||
args = parse_args(sys.argv[1:],
|
||||
args = parse_args(sysargv,
|
||||
'Simple High Frequency Trading Bot for crypto currencies')
|
||||
if not args:
|
||||
|
||||
# A subcommand has been issued
|
||||
if hasattr(args, 'func'):
|
||||
args.func(args)
|
||||
exit(0)
|
||||
|
||||
# Initialize logger
|
||||
|
Reference in New Issue
Block a user