FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 4a396954 authored by L. Bower's avatar L. Bower
Browse files

moving the check for the "live" flag into the runProcess function, so will be...

moving the check for the "live" flag into the runProcess function, so will be picked up when not running directly from the command line
parent fb1d2c9c
No related branches found
No related tags found
No related merge requests found
...@@ -298,10 +298,6 @@ def parse_and_check_args(todayString) -> dict: ...@@ -298,10 +298,6 @@ def parse_and_check_args(todayString) -> dict:
logger.info(f"Command-line options are:\n{args}") logger.info(f"Command-line options are:\n{args}")
if not args.live:
# remove the log handler that would send emails
logger.handlers = [h for h in logger.handlers if not isinstance(h, BufferingSMTPHandler.BufferingSMTPHandler)]
if not isinstance(args.config_paths,list): if not isinstance(args.config_paths,list):
logger.error('Expecting a list of config paths') logger.error('Expecting a list of config paths')
raise RuntimeError raise RuntimeError
...@@ -391,6 +387,10 @@ def run_Process(args: dict): ...@@ -391,6 +387,10 @@ def run_Process(args: dict):
# check initial state of each config file, and gather terms that must apply # check initial state of each config file, and gather terms that must apply
# across all provided configs # across all provided configs
if not args["live"]:
# remove the log handler that would send emails
logger.handlers = [h for h in logger.handlers if not isinstance(h, BufferingSMTPHandler.BufferingSMTPHandler)]
config_paths: List[str] = args['config_paths'] config_paths: List[str] = args['config_paths']
component: str = args['component'] component: str = args['component']
start_date: str = args['start_date'] start_date: str = args['start_date']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment