diff options
author | Mattia Rizzolo <mattia@debian.org> | 2017-02-09 18:42:52 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-02-09 18:44:39 +0100 |
commit | 609cc4c015c528ce2bf4e27554b0cb411f586f00 (patch) | |
tree | 5077b485d590f33e90bd02191cfcff9b9c70ce41 /bin | |
parent | f8f7169d15f3a0bcf577f61933cd5918883f38f5 (diff) | |
download | jenkins.debian.net-609cc4c015c528ce2bf4e27554b0cb411f586f00.tar.xz |
reproducible debian: breakages: use a set instead of the `if item not in foo: foo.append(item)` construction
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_breakages.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py index 6507ac03..8c04ea94 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=[]): |