]> git.decadent.org.uk Git - dak.git/blobdiff - dak/queue_report.py
Ignore more python-apt warnings.
[dak.git] / dak / queue_report.py
index a929a4b6b8e5eb87ede949284cd368b2dd3005e3..7176a886a8d76a9d05b6050c88b5993b84f7955e 100755 (executable)
 
 ################################################################################
 
+import warnings
+warnings.filterwarnings('ignore', \
+    "apt_pkg\.ParseTagFile\(\) is deprecated\. Please see apt_pkg\.TagFile\(\) for the replacement\.", \
+    DeprecationWarning)
+warnings.filterwarnings('ignore', \
+    "Attribute '.*' of the 'apt_pkg\.TagFile' object is deprecated, use '.*' instead\.", \
+    DeprecationWarning)
+
+################################################################################
+
 from copy import copy
 import glob, os, stat, sys, time
 import apt_pkg
@@ -222,6 +232,7 @@ def header():
 
 def footer():
     print "<p class=\"timestamp\">Timestamp: %s (UTC)</p>" % (time.strftime("%d.%m.%Y / %H:%M:%S", time.gmtime()))
+    print "<p class=\"timestamp\">There are <a href=\"/stat.html\">graphs about the queues</a> available.</p>"
 
     print """
     <div class="footer">
@@ -353,7 +364,7 @@ RRA:MAX:0.5:288:795
         try:
             rc = rrdtool.create(*create)
             ru = rrdtool.update(*update)
-        except rrdtool.error as e:
+        except rrdtool.error, e:
             print('warning: queue_report: rrdtool error, skipping %s.rrd: %s' % (type, e))
     except NameError:
         pass
@@ -653,17 +664,6 @@ def main():
     if Cnf.has_key("Queue-Report::Options::822"):
         f.close()
 
-    if Cnf.has_key("Queue-Report::Options::New"):
-        for dir in directories:
-            print """
-<p><img src="%s-day.png" alt="%s, last day"></p>
-<p><img src="%s-week.png" alt="%s, last week"></p>
-<p><img src="%s-month.png" alt="%s, last month"></p>
-<p><img src="%s-year.png" alt="%s, last year"></p>
-<p><img src="%s-5years.png" alt="%s, last 5 years"></p>
-<p><img src="%s-10years.png" alt="%s, last 10 years"></p>
-""" % ((dir,)*12)
-
     if Cnf.has_key("Queue-Report::Options::New"):
         footer()