Module: check_mk
Branch: master
Commit: 55ecd56f0991e3ba18e35c77b03b85479d3238d4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55ecd56f0991e3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 23 14:00:35 2012 +0100
FIX: snmp_uptime handles empty snmp information without exception
---
checks/snmp_uptime | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/snmp_uptime b/checks/snmp_uptime
index 4589397..5553543 100644
--- a/checks/snmp_uptime
+++ b/checks/snmp_uptime
@@ -27,11 +27,11 @@
# Author: Lars Michelsen <lm(a)mathias-kettner.de>
def inventory_snmp_uptime(info):
- if len(info[0]) >= 1:
+ if len(info) > 0 and len(info[0]) >= 1:
return [ (None, None) ]
def check_snmp_uptime(checktype, _no_params, info):
- if len(info[0]) >= 1:
+ if len(info) > 0 and len(info[0]) >= 1:
ticks = info[0][0]
try:
uptime = int(ticks[:-2])