changeset 51:3deaa7ed8b8c

merge
author Matt Johnston <matt@ucc.asn.au>
date Sun, 24 Jun 2012 10:38:07 +0800
parents 815d78062ba6 (current diff) cfcd2891b634 (diff)
children c3f5e02c1c42
files
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/web/log.py	Sun Jun 24 10:36:28 2012 +0800
+++ b/web/log.py	Sun Jun 24 10:38:07 2012 +0800
@@ -9,6 +9,7 @@
 import time
 import syslog
 import sqlite3
+import traceback
 from colorsys import hls_to_rgb
 
 import config
@@ -87,7 +88,12 @@
         rrdfile = sensor_rrd_path(sensor_id)
         print>>sys.stderr, values
         # XXX what to do here when it fails...
-        rrdtool.update(rrdfile, *values)
+        for v in values:
+            try:
+                rrdtool.update(rrdfile, v)
+            except Exception, e:
+                print>>sys.stderr, "Bad rrdtool update '%s'" % v
+                traceback.print_exc(file=sys.stderr)
 
         # be paranoid
         f = file(rrdfile)