From 4f0300cd656a3edb9241785cb06b74e6ef14f28f Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Fri, 3 Dec 2010 13:47:44 +0300 Subject: [PATCH] prevent traceback when parsing the log level --- src/common/logging_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/logging_helpers.py b/src/common/logging_helpers.py index 476736007..d8f73bf65 100644 --- a/src/common/logging_helpers.py +++ b/src/common/logging_helpers.py @@ -27,7 +27,7 @@ def parseLogLevel(arg): """ if arg.isdigit(): return int(arg) - elif arg.isupper(): + elif arg.isupper() and hasattr(logging, arg): return getattr(logging, arg) else: print _('%s is not a valid loglevel') % repr(arg)