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
This commit is contained in:
Damien Churchill 2012-01-17 17:07:09 +00:00
parent 2600785cbb
commit e91458662f
1 changed files with 4 additions and 1 deletions

View File

@ -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: