diff --git a/coordinator/Processor.py b/coordinator/Processor.py index 2a9ae29f37a2c27c4055449149b15e65919164c1..fec935e6ab132791ab865e0eb48b145bd2024ae0 100755 --- a/coordinator/Processor.py +++ b/coordinator/Processor.py @@ -298,10 +298,6 @@ def parse_and_check_args(todayString) -> dict: 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): logger.error('Expecting a list of config paths') raise RuntimeError @@ -391,6 +387,10 @@ def run_Process(args: dict): # check initial state of each config file, and gather terms that must apply # 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'] component: str = args['component'] start_date: str = args['start_date']