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:
parent
2600785cbb
commit
e91458662f
|
@ -95,8 +95,11 @@ class _UI(object):
|
||||||
if self.__options.quiet:
|
if self.__options.quiet:
|
||||||
self.__options.loglevel = "none"
|
self.__options.loglevel = "none"
|
||||||
|
|
||||||
|
if self.__options.loglevel:
|
||||||
|
self.__options.loglevel = self.__options.loglevel.lower()
|
||||||
|
|
||||||
# Setup the logger
|
# 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
|
log = deluge.log.LOG
|
||||||
|
|
||||||
if self.__options.config:
|
if self.__options.config:
|
||||||
|
|
Loading…
Reference in New Issue