[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian: breakages: use a set instead of the `if item not in foo: foo.append(item)` construction
Holger Levsen
holger at layer-acht.org
Thu Feb 9 17:45:00 UTC 2017
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 609cc4c015c528ce2bf4e27554b0cb411f586f00
Author: Mattia Rizzolo <mattia at debian.org>
Date: Thu Feb 9 18:42:52 2017 +0100
reproducible debian: breakages: use a set instead of the `if item not in foo: foo.append(item)` construction
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_html_breakages.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py
index 6507ac0..8c04ea9 100755
--- a/bin/reproducible_html_breakages.py
+++ b/bin/reproducible_html_breakages.py
@@ -18,7 +18,7 @@ def unrep_with_dbd_issues():
log.info('running unrep_with_dbd_issues check...')
without_dbd = []
bad_dbd = []
- sources_without_dbd = []
+ sources_without_dbd = set()
query = '''SELECT s.name, r.version, s.suite, s.architecture
FROM sources AS s JOIN results AS r ON r.package_id=s.id
WHERE r.status='unreproducible'
@@ -30,8 +30,7 @@ def unrep_with_dbd_issues():
eversion + '.diffoscope.html'
if not os.access(dbd, os.R_OK):
without_dbd.append((pkg, version, suite, arch))
- if pkg not in sources_without_dbd:
- sources_without_dbd.append(pkg)
+ sources_without_dbd.add(pkg)
log.warning(suite + '/' + arch + '/' + pkg + ' (' + version + ') is '
'unreproducible without diffoscope file.')
else:
@@ -42,8 +41,7 @@ def unrep_with_dbd_issues():
log.warning(suite + '/' + arch + '/' + pkg + ' (' + version + ') has '
'diffoscope output, but it does not seem to '
'be an HTML page.')
- if pkg not in sources_without_dbd:
- sources_without_dbd.append(pkg)
+ sources_without_dbd.add(pkg)
return without_dbd, bad_dbd, sources_without_dbd
def count_pkgs(pkgs_to_count=[]):
--
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