Module: check_mk
Branch: master
Commit: 0be1a3233404bf9856f0e053e8b6dbdfde92c503
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0be1a3233404bf…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue May 5 09:06:27 2015 +0200
#1245 FIX printer_output: Now correctly detect a bin with unknown as name
---
.werks/1245 | 10 ++++++++++
ChangeLog | 1 +
checks/printer_io.include | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1245 b/.werks/1245
new file mode 100644
index 0000000..f37c7a1
--- /dev/null
+++ b/.werks/1245
@@ -0,0 +1,10 @@
+Title: printer_output: Now correctly detect a bin with unknown as name
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1430809514
+
+
diff --git a/ChangeLog b/ChangeLog
index 854b854..21913de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -353,6 +353,7 @@
* 2075 FIX: check_mk_agent: fixed formatting error for windows eventlog entries >
2048 characters...
* 2077 FIX: Windows MSI Installer: fixed automatical install of agent plugins...
* 1244 FIX: windows_tasks: Fixed handling of tasks manually stopped by admin...
+ * 1245 FIX: printer_output: Now correctly detect a bin with unknown as name
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/printer_io.include b/checks/printer_io.include
index 79599f1..af349a6 100644
--- a/checks/printer_io.include
+++ b/checks/printer_io.include
@@ -84,7 +84,7 @@ def inventory_printer_io(info):
# When no name is set
# a) try to use the description
# b) try to use the type otherwise use the index
- if not name:
+ if name == "unknown" or not name:
name = descr and descr or index.split('.')[-1]
yield (name, {})