diff options
author | Brian May <brian@linuxpenguins.xyz> | 2018-08-20 17:02:59 +1000 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2018-08-20 17:03:53 +1000 |
commit | 31aca62f62cce87080136d412887985f33f14002 (patch) | |
tree | a8423bc0ba5c597ab3c023fe1b33291a883bb16c /bin/mass-bug-filer | |
parent | 5329c29f14195ba309102d64eb8d088c4d36ffc1 (diff) |
Replace "x.has_key(y)" with "y in x" syntax
Diffstat (limited to 'bin/mass-bug-filer')
-rwxr-xr-x | bin/mass-bug-filer | 4 |
1 files changed, 2 insertions, 2 deletions
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) |