SW-Inventory based columns
Message-ID: <569f9883./N7vgjSt+2tRedpK%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: da34026a07bf4ef025f3d8bab024a0c205487f05
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=da34026a07bf4e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 20 15:23:54 2016 +0100
#2906 FIX Fixed crash in views containing special chars in HW/SW-Inventory based columns
---
.werks/2906 | 9 +++++++++
ChangeLog | 1 +
web/plugins/views/inventory.py | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/2906 b/.werks/2906
new file mode 100644
index 0000000..24b7f4d
--- /dev/null
+++ b/.werks/2906
@@ -0,0 +1,9 @@
+Title: Fixed crash in views containing special chars in HW/SW-Inventory based columns
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453299789
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 416f176..0da5f5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -296,6 +296,7 @@
* 2439 FIX: solaris_prtdiag: Can now handle Oracle Corporation SUN FIRE X4170 M2
SERVER...
* 2827 FIX: win_disks, win_video: now able to detect multiple instances
* 2828 FIX: win_disks: now able to handle disks with missing size or media type
information
+ * 2906 FIX: Fixed crash in views containing special chars in HW/SW-Inventory based
columns
1.2.7i3:
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 1fb802b..b3bcc1f 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -787,7 +787,7 @@ def declare_invtable_columns(infoname, invpath, topic):
def declare_invtable_column(infoname, name, topic, title, short_title, sortfunc,
render_func, filter_class):
column = infoname + "_" + name
if render_func == None:
- paint = lambda row: ("", str(row.get(column)))
+ paint = lambda row: ("", "%s" % row.get(column))
else:
def paint(row):
if column not in row: