Module: check_mk
Branch: master
Commit: 91dedde6faf4d06996a69790755b0109f4de3861
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91dedde6faf4d0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 16 15:06:07 2011 +0100
WATO: fix editing of icon images (none-case)
---
web/plugins/wato/check_mk_configuration.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 076e3d8..f5504eb 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -582,7 +582,7 @@ class MonitoringIcon(ValueSpec):
def render_input(self, varprefix, value):
num_columns = 12
html.write("<table>")
- for nr, filename in enumerate([None] + self.available_icons()):
+ for nr, filename in enumerate([""] + self.available_icons()):
if nr % num_columns == 0:
html.write("<tr>")
html.write("<td>")
@@ -605,13 +605,13 @@ class MonitoringIcon(ValueSpec):
def from_html_vars(self, varprefix):
nr = int(html.var(varprefix))
if nr == 0:
- return None
+ return ""
else:
return self.available_icons()[nr-1]
def validate_datatype(self, value, varprefix):
- if value != None and type(value) != str:
- raise MKUserError(varprefix, _("The type is %s, but should be None or
str") %
+ if type(value) != str:
+ raise MKUserError(varprefix, _("The type is %s, but should be str")
%
type(value))
def validate_value(self, value, varprefix):