added #noqa

This commit is contained in:
vicky 2022-05-17 20:16:34 +02:00
parent f0fcb61e7f
commit d8ce58c026
1 changed files with 3 additions and 3 deletions

View File

@ -32,9 +32,9 @@ def init_logging(filename=None, loglevel="ERROR", filemode='w', handler=None):
handler = []
if filename is not None:
logging.basicConfig(filename=filename, filemode=filemode, level=logging.__getattribute__(loglevel))
logging.basicConfig(filename=filename, filemode=filemode, level=logging.__getattribute__(loglevel)) # noqa
else:
logging.basicConfig(level=logging.__getattribute__(loglevel), handlers=handler)
logging.basicConfig(level=logging.__getattribute__(loglevel), handlers=handler) # noqa
def log_message(message, level="ERROR"):
@ -46,7 +46,7 @@ def log_message(message, level="ERROR"):
:return: None
"""
level = level.lower()
logging.__getattribute__(level)(message)
logging.__getattribute__(level)(' ' + message)
if level in ["critical"]:
print("An unrecoverable error occurred, please check the log file for more information.")