From 75676866d4bf394b3ba1ddef06e0c93f6da03242 Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Fri, 8 Aug 2008 10:27:33 +1000 Subject: 'mapping.has_key' is deprecated, use current Python 'key in mapping' idiom. --- tests/test_aptsources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 3e2f7ac5..9f439899 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -104,7 +104,7 @@ class TestAptSources(unittest.TestCase): "edgy" in entry.dist): for c in entry.comps: if c == comp: - if not found.has_key(entry.dist): + if entry.dist not in found: found[entry.dist] = 0 found[entry.dist] += 1 #print "".join([s.str() for s in sources]) @@ -121,7 +121,7 @@ class TestAptSources(unittest.TestCase): entry.template.name == "edgy"): for c in entry.comps: if c == comp: - if not found.has_key(entry.dist): + if entry.dist not in found: found[entry.dist] = 0 found[entry.dist] += 1 #print "".join([s.str() for s in sources]) -- cgit v1.2.3