mirror of https://github.com/SystemRage/py-kms.git
Remove validation of LOGFILE extension
This commit is contained in:
parent
66c51d7ea9
commit
5de292e12a
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue