summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/logger.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pykolab/logger.py b/pykolab/logger.py
index e16c6eb..6f82d5d 100644
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -41,7 +41,11 @@ class Logger(logging.Logger):
if hasattr(sys, 'argv'):
for arg in sys.argv:
if debuglevel == -1:
- debuglevel = int(arg)
+ try:
+ debuglevel = int(arg)
+ except ValueError, errmsg:
+ continue
+
loglevel = logging.DEBUG
break