Default to ERROR logging level if the supplied logging level is invalid

This commit is contained in:
Andrew Resch 2009-01-18 06:24:49 +00:00
parent 5672db086a
commit b7f9fec075

View file

@ -43,7 +43,7 @@ def setupLogger(level="error", filename=None):
:param filename: str, the file to log to
"""
if not level:
if not level or level not in levels:
level = "error"
logging.basicConfig(