From 3cfe6e8c8f42565ceb68e8f2cb44be5772d4a3e4 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Thu, 16 Nov 2023 21:09:04 +1100 Subject: [PATCH] relaxed check for log-file --- xnat_ingest/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xnat_ingest/utils.py b/xnat_ingest/utils.py index f34462b..4c48a92 100644 --- a/xnat_ingest/utils.py +++ b/xnat_ingest/utils.py @@ -86,8 +86,6 @@ def set_logger_handling( ): # Configure the email logger if log_emails: - if isinstance(log_emails, tuple): - log_email = LogEmail(*log_emails) if not mail_server: raise ValueError( "Mail server needs to be provided, either by `--mail-server` option or " @@ -107,9 +105,7 @@ def set_logger_handling( logger.addHandler(smtp_hdle) # Configure the file logger - if log_file is not None: - if isinstance(log_file, tuple): - log_file = LogFile(*log_file) + if log_file: log_file.path.parent.mkdir(exist_ok=True) log_file_hdle = logging.FileHandler(log_file) log_file_hdle.setLevel(getattr(logging, log_file.loglevel.upper()))