소스 검색

Don't crash if there are no thresolds

Signed-off-by: Sven Velt <sven@velt.de>
Sven Velt 14 년 전
부모
커밋
3714bd8fcd
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      monitoringplugin.py

+ 4 - 1
monitoringplugin.py

@@ -93,7 +93,10 @@ class MonitoringPlugin(object):
 
 
 	def value_in_range(self, value, range):
-		(low, high, negate) = self.range_to_limits(range)
+		if range not in ['', None]:
+			(low, high, negate) = self.range_to_limits(range)
+		else:
+			return True
 
 		if value < low or value > high:
 			result = False