From b2139f7182417975fa6e5c3f5b342d5f00599708 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 8 Jan 2015 20:17:32 +0100 Subject: reproducible: html_notes: fix KeyError in case a issue does not affect any package --- bin/reproducible_html_notes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index b6b6f103..01c7a516 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -224,9 +224,12 @@ def gen_html_issue(issue): url = '' # add affected packages: affected = '' - for pkg in sorted(issues_count[issue]): - affected += tab*6 + '%s\n' % ( - RB_PKG_URI, pkg, pkg) + try: + for pkg in sorted(issues_count[issue]): + affected += tab*6 + '%s\n' \ + % (RB_PKG_URI, pkg, pkg) + except KeyError: # The note is not listed in any package, that is + affected = 'None' # check for description: try: desc = issues[issue]['description'] -- cgit v1.2.3-70-g09d2