From 31aca62f62cce87080136d412887985f33f14002 Mon Sep 17 00:00:00 2001 From: Brian May Date: Mon, 20 Aug 2018 17:02:59 +1000 Subject: Replace "x.has_key(y)" with "y in x" syntax --- bin/mass-bug-filer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/mass-bug-filer') 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) -- cgit v1.2.3