Module: check_mk
Branch: master
Commit: 80a195a4935c8a519dac2df67a2a61044ef2d00d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80a195a4935c8a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 29 15:18:50 2015 +0200
#2367 FIX win_system: Fixed exception when non-UTF-8 sequences are contained agent output
---
.werks/2367 | 10 ++++++++++
ChangeLog | 3 +++
modules/check_mk_base.py | 5 ++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/2367 b/.werks/2367
new file mode 100644
index 0000000..2df0518
--- /dev/null
+++ b/.werks/2367
@@ -0,0 +1,10 @@
+Title: win_system: Fixed exception when non-UTF-8 sequences are contained agent output
+Level: 2
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1435583756
+
+
diff --git a/ChangeLog b/ChangeLog
index 513ef39..8c23f21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,9 @@
* 2348 FIX: HTML-Mails: Added missing link to service descriptions
* 2349 FIX: HTML-Mails: Fixed state colors in Outlook
+ HW/SW-Inventory:
+ * 2367 FIX: win_system: Fixed exception when non-UTF-8 sequences are contained agent
output
+
1.2.7i2:
Core & Setup:
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 5b1a339..3ec21cf 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -934,7 +934,10 @@ def parse_info(lines, hostname):
except:
pass
elif to_unicode:
- line = line.decode('utf-8')
+ try:
+ line = line.decode('utf-8')
+ except:
+ line = line.decode('latin1')
section.append(line.split(separator))