summaryrefslogtreecommitdiffstats
path: root/bin/mass-bug-filer
diff options
context:
space:
mode:
authorBrian May <brian@linuxpenguins.xyz>2018-08-20 17:02:59 +1000
committerBrian May <brian@linuxpenguins.xyz>2018-08-20 17:03:53 +1000
commit85592e7c4627fd355fee2a7d322360f51d7c08c0 (patch)
treeca3ce3f8db23d27966c756f9f8544cb0b92a696a /bin/mass-bug-filer
parentb92c7cf1a42bd1588e7788a63bae735b65b27513 (diff)
Replace "x.has_key(y)" with "y in x" syntax
Diffstat (limited to 'bin/mass-bug-filer')
-rwxr-xr-xbin/mass-bug-filer4
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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy