diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2018-09-15 17:21:04 +0200 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2018-09-15 17:21:04 +0200 |
commit | 1271f9f67a65ff00cc3c2615c111a6205c236964 (patch) | |
tree | aebba18757b51ff3dde372b9e69d38daa53d460c /bin | |
parent | 84eb3bcae498c6e618dea2cc018513e4954d9e69 (diff) | |
parent | 85592e7c4627fd355fee2a7d322360f51d7c08c0 (diff) |
Merge branch 'bam/security-tracker-update_python_haskey'
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check-syntax | 2 | ||||
-rwxr-xr-x | bin/mass-bug-filer | 4 | ||||
-rwxr-xr-x | bin/tracker_service.py | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/check-syntax b/bin/check-syntax index 9e171778e1..11a48059eb 100755 --- a/bin/check-syntax +++ b/bin/check-syntax @@ -29,7 +29,7 @@ def do_parse(f): n = r.name if n[0:4] in ('CAN', 'CVE'): n = n[4:] - if names.has_key(n): + if n in names: if names[n] != r.name: sys.stderr.write("error: duplicate CVE entry: %s and %s\n" % (names[n], r.name)) diff --git a/bin/mass-bug-filer b/bin/mass-bug-filer index ce2477e0d2..e7dfb5e310 100755 --- a/bin/mass-bug-filer +++ b/bin/mass-bug-filer @@ -17,7 +17,7 @@ packages = sys.argv[2:] cache = apt.Cache() errors = False for p in packages: - if not cache.has_key(p): + if p not in cache: print("error: no such package:", p, file=sys.stderr) errors = True if errors: @@ -52,7 +52,7 @@ for line in source_lines: if k == "Subject": h_subject = v continue - if h_bug.has_key(k): + if k in h_bug: h_bug[k] = v continue print("error: invalid header field:", k, file=sys.stderr) diff --git a/bin/tracker_service.py b/bin/tracker_service.py index 0d764e239e..971f4b4e38 100755 --- a/bin/tracker_service.py +++ b/bin/tracker_service.py @@ -1407,7 +1407,7 @@ Debian bug number.'''), winner='' for suffix in ('','-security','-lts'): subrelease=release+suffix - if status[pkg][issue].has_key(subrelease): + if subrelease in status[pkg][issue]: if status[pkg][issue][subrelease] == 0: # the issue is fixed, let's pick this subrelease and be done winner=suffix @@ -1426,14 +1426,14 @@ Debian bug number.'''), else: state = "open" suite_urgency = urgency[pkg][issue][repository] - if nodsa[pkg][issue].has_key(repository): + if repository in nodsa[pkg][issue]: suite_nodsa = nodsa[pkg][issue][repository] - if nodsa_reason[pkg][issue].has_key(repository): + if repository in nodsa_reason[pkg][issue]: suite_nodsa_reason = nodsa_reason[pkg][issue][repository] for repository in repositories[pkg][issue]: for suffix in ('','-security','-lts'): subrelease=release+suffix - if version[pkg][issue].has_key(subrelease): + if subrelease in version[pkg][issue]: suite_repositories[subrelease] = version[pkg][issue][subrelease] suites[release] = { "status": state, "repositories": suite_repositories, |