# HG changeset patch # User Matt Johnston # Date 1340505476 -28800 # Node ID cfcd2891b63488afda326e804a5bee2023a66eaa # Parent 206294a354a7a62a42c81ad078bd7f4c65e2b3f7# Parent 9ccd965d938a3cdf08193f7f0599ace3678136bb merge diff -r 9ccd965d938a -r cfcd2891b634 web/log.py --- a/web/log.py Sun Jun 24 00:44:28 2012 +0800 +++ b/web/log.py Sun Jun 24 10:37:56 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)