[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: let's beat the notes job in shape, to make it deal gracefully with broken popcon data

Holger Levsen holger at layer-acht.org
Sat Sep 24 10:51:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 1fa7b9fb976fc79020e4527770bc6b0c68000db7
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Sep 24 12:51:30 2016 +0200

    reproducible Debian: let's beat the notes job in shape, to make it deal gracefully with broken popcon data
---
 bin/reproducible_html_notes.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index 509a2bc..3d2a646 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -393,13 +393,16 @@ def iterate_over_issues(issues):
 def issues_popcon_annotate(issues_list):
     # outputs [(package, popcon, is_popular)] where is_popular True if it's
     # in the upper 1/4 of issues_list, i.e. a relative measure
-    n = len(issues_list)
-    popcon_dict = dict((p, 0) for p in issues_list)
-    popcon_dict.update(popcon.package(*issues_list))
-    issues = sorted(popcon_dict.items(), key=lambda p: p[0])
-    issues_by_popcon = sorted(issues, key=lambda p: p[1], reverse=True)
-    issues_with_popcon = [(p[0], p[1], i<n/4) for i, p in enumerate(issues_by_popcon)]
-    return sorted(issues_with_popcon, key=lambda p: p[0])
+    try:
+        n = len(issues_list)
+        popcon_dict = dict((p, 0) for p in issues_list)
+        popcon_dict.update(popcon.package(*issues_list))
+        issues = sorted(popcon_dict.items(), key=lambda p: p[0])
+        issues_by_popcon = sorted(issues, key=lambda p: p[1], reverse=True)
+        issues_with_popcon = [(p[0], p[1], i<n/4) for i, p in enumerate(issues_by_popcon)]
+        return sorted(issues_with_popcon, key=lambda p: p[0])
+    except:
+        return issues_list
 
 
 def sort_issues(scorefunc, issue):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list