Module: check_mk
Branch: master
Commit: 4ebf185ee1a1144f9df6dcf9e8d911351f439c0c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ebf185ee1a114…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 18:36:01 2013 +0100
FIX cups_queues: Fixed bug checking the last queue reported by agent
An exception occured when checking the last queue reported by the agent.
---
.werks/369 | 10 ++++++++++
ChangeLog | 1 +
checks/cups_queues | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/369 b/.werks/369
new file mode 100644
index 0000000..f382b2c
--- /dev/null
+++ b/.werks/369
@@ -0,0 +1,10 @@
+Title: cups_queues: Fixed bug checking the last queue reported by agent
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387215298
+Targetversion: future
+
+An exception occured when checking the last queue reported by the agent.
diff --git a/ChangeLog b/ChangeLog
index 7b7dc50..6fbc7e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 0367 FIX: Now using /dev/null instead of closing stdin in linux agent...
* 0342 FIX: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x...
* 0343 FIX: postgres_sessions: make agent plugin compatible with PostgreSQL 9.2...
+ * 0369 FIX: cups_queues: Fixed bug checking the last queue reported by agent...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
diff --git a/checks/cups_queues b/checks/cups_queues
index 3af5cb9..fa1a092 100644
--- a/checks/cups_queues
+++ b/checks/cups_queues
@@ -67,7 +67,7 @@ def check_cups_queues(item, params, info):
status = ' '.join(line[2:4])
# If the next line does not start with "printer" append it as
additional output
- if not info[num+1][0] in [ 'printer', '---' ]:
+ if len(info) > num+1 and not info[num+1][0] in [ 'printer',
'---' ]:
statusoutput += " (%s)" % " ".join(info[num+1])
if status == "disabled since":