# HG changeset patch # User Matt Johnston # Date 1340505476 -28800 # Node ID 0c181d77c85ab44534651beff36c0df3822da713 # Parent a1aa4176ca2c39b309f4b7af1137b02c84079180# Parent 99f8b97a944935a3348563f63d28569c872afd1a merge diff -r 99f8b97a9449 -r 0c181d77c85a 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)