]> git.decadent.org.uk Git - dak.git/commitdiff
queue_report: Ignore stuff without a source
authorGergely Nagy <algernon@madhouse-project.org>
Wed, 13 Jun 2012 13:19:42 +0000 (13:19 +0000)
committerGergely Nagy <algernon@madhouse-project.org>
Wed, 13 Jun 2012 13:19:42 +0000 (13:19 +0000)
Trainees can't see files in byhand, therefore process_changes_file in
queue_report is unable to handle changes files in queue/byhand. As a
workaround, whenever it encounters a changes file that it can't read
(and thus, cache[filename] has no source key), ignore that and
continue.

The result is that trainees will be able to use queue-report without a
backtrace, they just won't be able to see byhand, as intended. For
everyone else, queue-report should work as before.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
dak/queue_report.py

index a3b59738df18c7c7d5b9e04d3719463b0582b15a..dba38769a5a9d96b9bbc4080f6ce2b3f11768db6 100755 (executable)
@@ -383,6 +383,8 @@ def process_changes_files(changes_files, type, log, rrd_dir):
     # Divide the .changes into per-source groups
     per_source = {}
     for filename in cache.keys():
+       if not cache[filename].has_key("source"):
+            continue
         source = cache[filename]["source"]
         if not per_source.has_key(source):
             per_source[source] = {}