enigma2: demoplugins-upnpmediarenderer needs systemplugins-upnp
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-3.999git20160612 / 0002-LogConfig-fix-log-level-handling-ConfigSelection-use.patch
1 From 43a1859256ce9943c855f5005e86bd32cd60cf78 Mon Sep 17 00:00:00 2001
2 From: reichi <reichi@opendreambox.org>
3 Date: Mon, 8 Sep 2014 17:02:08 +0200
4 Subject: [PATCH 2/2] LogConfig: fix log level handling (ConfigSelection uses
5  string-indexes)
6
7 (cherry picked from commit 8a79f6e92d76d73271a9ed6531e91084b75076bf)
8 ---
9  usr/lib/enigma2/python/Tools/LogConfig.py | 6 +++---
10  1 file changed, 3 insertions(+), 3 deletions(-)
11
12 diff --git a/usr/lib/enigma2/python/Tools/LogConfig.py b/usr/lib/enigma2/python/Tools/LogConfig.py
13 index 95d0a45..f97c83a 100644
14 --- a/usr/lib/enigma2/python/Tools/LogConfig.py
15 +++ b/usr/lib/enigma2/python/Tools/LogConfig.py
16 @@ -16,10 +16,10 @@ class LogConfig(object):
17                 if LogConfig._initialized:
18                         return
19                 else:
20 -                       from Components.config import config, ConfigSubsection, ConfigOnOff, ConfigSelection, ConfigInteger
21 +                       from Components.config import config, ConfigSubsection, ConfigOnOff, ConfigSelection
22                         config.log = ConfigSubsection()
23                         config.log.level = ConfigSelection(
24 -                               choices={ LOG_TYPE_INFO : "INFO", LOG_TYPE_WARNING : "WARNING", LOG_TYPE_ERROR : "ERROR" }, default=LOG_TYPE_INFO)
25 +                               choices={ str(LOG_LEVEL_DEBUG) : "DEBUG", str(LOG_LEVEL_INFO) : "INFO", str(LOG_LEVEL_WARNING) : "WARNING", str(LOG_LEVEL_ERROR) : "ERROR",  }, default=str(LOG_LEVEL_INFO))
26                         config.log.verbose = ConfigOnOff(default=False)
27                         config.log.colored = ConfigOnOff(default=True)
28                         LogConfig._initialized = True
29 @@ -27,7 +27,7 @@ class LogConfig(object):
30         @staticmethod
31         def level():
32                 from Components.config import config
33 -               return config.log.level.value
34 +               return int(config.log.level.value)
35  
36         @staticmethod
37         def verbose():
38 -- 
39 1.9.1
40