use correct return_code if an error occured
This commit is contained in:
parent
4c97ee45dd
commit
3f4261ad1e
@ -41,6 +41,7 @@ def main(sysargv: List[str]) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
freqtrade = None
|
freqtrade = None
|
||||||
|
return_code = 1
|
||||||
try:
|
try:
|
||||||
# Load and validate configuration
|
# Load and validate configuration
|
||||||
configuration = Configuration(args)
|
configuration = Configuration(args)
|
||||||
@ -54,12 +55,13 @@ def main(sysargv: List[str]) -> None:
|
|||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.info('SIGINT received, aborting ...')
|
logger.info('SIGINT received, aborting ...')
|
||||||
|
return_code = 0
|
||||||
except BaseException:
|
except BaseException:
|
||||||
logger.exception('Fatal exception!')
|
logger.exception('Fatal exception!')
|
||||||
finally:
|
finally:
|
||||||
if freqtrade:
|
if freqtrade:
|
||||||
freqtrade.clean()
|
freqtrade.clean()
|
||||||
sys.exit(0)
|
sys.exit(return_code)
|
||||||
|
|
||||||
|
|
||||||
def set_loggers() -> None:
|
def set_loggers() -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user