From e91458662f76fd3fee4b29255ba0951282e6ba7c Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 17 Jan 2012 17:07:09 +0000 Subject: [PATCH] ui: fix error in last commit The last commit assumed that loglevel would always be a string, take into account that it can sometimes be None --- deluge/ui/ui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/ui/ui.py b/deluge/ui/ui.py index 41de0c652..da3656dc7 100644 --- a/deluge/ui/ui.py +++ b/deluge/ui/ui.py @@ -95,8 +95,11 @@ class _UI(object): if self.__options.quiet: self.__options.loglevel = "none" + if self.__options.loglevel: + self.__options.loglevel = self.__options.loglevel.lower() + # Setup the logger - deluge.log.setupLogger(level=self.__options.loglevel.lower(), filename=self.__options.logfile) + deluge.log.setupLogger(level=self.__options.loglevel, filename=self.__options.logfile) log = deluge.log.LOG if self.__options.config: