From 7b3c2a52a559c459ddf5da96cfeceba8b19cba9d Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Sun, 20 Feb 2011 14:23:58 +0800 Subject: [PATCH] Make rrdtool errors non-fatal to reduce distruption. --- dak/graph.py | 5 ++++- dak/queue_report.py | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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 -- 2.39.2