Author: justi9
Date: 2008-06-16 22:27:33 -0400 (Mon, 16 Jun 2008)
New Revision: 2154
Modified:
mgmt/cumin/python/cumin/stat.py
Log:
Protect against nulls
Modified: mgmt/cumin/python/cumin/stat.py
===================================================================
--- mgmt/cumin/python/cumin/stat.py 2008-06-16 23:03:37 UTC (rev 2153)
+++ mgmt/cumin/python/cumin/stat.py 2008-06-17 02:27:33 UTC (rev 2154)
@@ -211,8 +211,8 @@
for stat in stats:
vals = values[stat]
if vals:
- max_value = max(max(vals), max_value)
- min_value = min(min(vals), min_value)
+ max_value = max(nvl(max(vals), 0), max_value)
+ min_value = min(nvl(min(vals), 0), min_value)
max_value = round(max_value * 1.1 + 1)
Show replies by date