From: Gergely Nagy Date: Wed, 13 Jun 2012 13:19:42 +0000 (+0000) Subject: queue_report: Ignore stuff without a source X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=01155cdff0ed5580dac035e03f0c7cc318a635cf;p=dak.git queue_report: Ignore stuff without a source 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 --- diff --git a/dak/queue_report.py b/dak/queue_report.py index a3b59738..dba38769 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -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] = {}