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 | d6bee3ece48bb4ae8ed8e122f68dcbba32a846f5 (patch) | |
tree | deff196d13166fa1201ca32e16215b1a9e3714c7 /bin/mass-bug-filer | |
parent | 7743111dddb7efdc632e1194b33b3060bce7394d (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) |