Remove validation of LOGFILE extension

This commit is contained in:
Matthew Beckett 2021-10-07 20:04:49 +01:00 committed by Simon Beginn
parent 66c51d7ea9
commit 5de292e12a
No known key found for this signature in database
GPG Key ID: 033A4D4CE4E063D6
1 changed files with 1 additions and 4 deletions

View File

@ -227,7 +227,7 @@ def logger_create(log_obj, config, mode = 'a'):
log_obj.setLevel(config['loglevel']) log_obj.setLevel(config['loglevel'])
#------------------------------------------------------------------------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------------------------------------------------------------------------
def check_dir(path, where, log_obj = None, argument = '-F/--logfile', typefile = '.log'): def check_dir(path, where, log_obj = None, argument = '-F/--logfile'):
filename = os.path.basename(path) filename = os.path.basename(path)
pathname = os.path.dirname(path) pathname = os.path.dirname(path)
extension = os.path.splitext(filename)[1] extension = os.path.splitext(filename)[1]
@ -243,9 +243,6 @@ def check_dir(path, where, log_obj = None, argument = '-F/--logfile', typefile =
pathname = filename pathname = filename
pretty_printer(log_obj = log_obj, where = where, to_exit = True, pretty_printer(log_obj = log_obj, where = where, to_exit = True,
put_text = msg_dir %(argument, pathname)) put_text = msg_dir %(argument, pathname))
elif not extension.lower() == typefile:
pretty_printer(log_obj = log_obj, where = where, to_exit = True,
put_text = msg_fil %(argument, typefile, extension))
def check_logfile(optionlog, defaultlog, where): def check_logfile(optionlog, defaultlog, where):
if not isinstance(optionlog, list): if not isinstance(optionlog, list):