[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] 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 <algernon@madhouse-project.org>
---
 dak/queue_report.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dak/queue_report.py b/dak/queue_report.py
index a3b5973..dba3876 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] = {}
-- 
1.7.2.5



Reply to: