From: Paul Wise Date: Sun, 20 Feb 2011 06:23:58 +0000 (+0800) Subject: Make rrdtool errors non-fatal to reduce distruption. X-Git-Tag: debian-r/squeeze~346 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7b3c2a52a559c459ddf5da96cfeceba8b19cba9d;p=dak.git Make rrdtool errors non-fatal to reduce distruption. --- diff --git a/dak/graph.py b/dak/graph.py index 9afc02e0..899549a9 100755 --- a/dak/graph.py +++ b/dak/graph.py @@ -96,7 +96,10 @@ GPRINT:avgds0:\tAvg\\: %%3.0lf\\j """ % (rrd_file, rrd_file, name.upper())).strip().split("\n") rrd_args += extra_args - rrdtool.graph(*rrd_args) + try: + ret = rrdtool.graph(*rrd_args) + except rrdtool.error as e: + print('warning: graph: rrdtool error, skipping %s-%s.png: %s' % (name, graph, e)) ################################################################################ diff --git a/dak/queue_report.py b/dak/queue_report.py index 19673d55..a929a4b6 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -350,8 +350,11 @@ RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:795 """.strip().split("\n") - rrdtool.create(*create) - rrdtool.update(*update) + try: + rc = rrdtool.create(*create) + ru = rrdtool.update(*update) + except rrdtool.error as e: + print('warning: queue_report: rrdtool error, skipping %s.rrd: %s' % (type, e)) except NameError: pass