Skip to content

Commit

Permalink
relaxed check for log-file
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Nov 16, 2023
1 parent d86571c commit 3cfe6e8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions xnat_ingest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -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()))
Expand Down

0 comments on commit 3cfe6e8

Please sign in to comment.