Module: check_mk
Branch: master
Commit: 2ba253fdfcac16db0ac4d2b894ca55fbe7cbafcb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2ba253fdfcac16…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 22 11:07:09 2017 +0100
Fixed categories() call sites (Method does not return a dict)
Change-Id: I978d931c0299595200026cc7d0992d6bce0be95c
---
web/htdocs/valuespec.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index f529d45..6136b18 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -4167,12 +4167,12 @@ class IconSelector(ValueSpec):
@classmethod
def categories(cls):
import config# FIXME: Clean this up. But how?
- return (config.wato_icon_categories)
+ return config.wato_icon_categories
@classmethod
def category_alias(cls, category_name):
- return cls.categories().get(category_name, category_name)
+ return dict(cls.categories()).get(category_name, category_name)
# All icons within the images/icons directory have the ident of a category
@@ -4185,7 +4185,7 @@ class IconSelector(ValueSpec):
if not only_local:
dirs.append(os.path.join(cmk.paths.omd_root,
"share/check_mk/web/htdocs/images/icons"))
- valid_categories = self.categories().keys()
+ valid_categories = dict(self.categories()).keys()
from PIL import Image
@@ -4235,7 +4235,7 @@ class IconSelector(ValueSpec):
by_cat[category_name].append(icon_name)
icon_categories = []
- for category_name, category_alias in self.categories().items():
+ for category_name, category_alias in self.categories():
if category_name in by_cat:
icon_categories.append((category_name, category_alias,
by_cat[category_name]))
return icon_categories