Module: check_mk
Branch: master
Commit: 365d13d71b8eb7f561793fe1e5ef709d05d997d3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=365d13d71b8eb7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 12 14:00:47 2013 +0200
TextAscii: Fixed editing of unicode strings
---
web/htdocs/valuespec.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 15b93aa..21c0e52 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -327,12 +327,14 @@ class TextAscii(ValueSpec):
def render_input(self, varprefix, value):
if value == None:
value = ""
+ elif type(value) != unicode:
+ value = str(value)
if self._label:
html.write(self._label)
html.write(" ")
- html.text_input(varprefix, str(value), size = self._size, read_only =
self._read_only)
+ html.text_input(varprefix, value, size = self._size, read_only =
self._read_only)
self.render_buttons()
def render_buttons(self):