]> git.decadent.org.uk Git - dak.git/commitdiff
Make rrdtool errors non-fatal to reduce distruption.
authorPaul Wise <pabs@debian.org>
Sun, 20 Feb 2011 06:23:58 +0000 (14:23 +0800)
committerJoerg Jaspert <joerg@debian.org>
Sun, 20 Feb 2011 10:02:49 +0000 (11:02 +0100)
dak/graph.py
dak/queue_report.py

index 9afc02e02e590b8135d6668df38eda4628ca7a41..899549a9b3ee76c1db1ae13b324054f563ebfe5e 100755 (executable)
@@ -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))
 
 ################################################################################
 
index 19673d5593a0d313de1d97598d0236c6b4cffd9f..a929a4b6b8e5eb87ede949284cd368b2dd3005e3 100755 (executable)
@@ -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