Module: check_mk
Branch: master
Commit: 944babe61aebfde2593e72e958ad42aa6763a4e8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=944babe61aebfd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Aug 11 12:45:08 2011 +0200
FIX: handle usewalk, when OIDs at the end of the walks are used
---
modules/snmp.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/snmp.py b/modules/snmp.py
index de0ce2e..a7a165a 100644
--- a/modules/snmp.py
+++ b/modules/snmp.py
@@ -420,6 +420,12 @@ def get_stored_snmpwalk(hostname, oid):
def collect_until(index, direction):
rows = []
+ # Handle case, where we run after the end of the lines list
+ if index >= len(lines):
+ if direction > 0:
+ return []
+ else:
+ index -= 1
while True:
line = lines[index]
parts = line.split(None, 1)