diff options
-rw-r--r-- | tests/test_debiandistro.py | 2 | ||||
-rwxr-xr-x | whatmaps/command.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_debiandistro.py b/tests/test_debiandistro.py index a166aa8..771d1b6 100644 --- a/tests/test_debiandistro.py +++ b/tests/test_debiandistro.py @@ -85,7 +85,7 @@ class TestDebianDistro(unittest.TestCase): with patch('sys.stdin', new_callable=AptPipelineMock): pkgs = DebianDistro.read_apt_pipeline() self.assertEqual(len(pkgs), 1) - self.assertTrue(pkgs.has_key('pkg1')) + self.assertIn('pkg1', pkgs) self.assertTrue(pkgs['pkg1'].name, 'pkg1') @patch('apt_pkg.init') diff --git a/whatmaps/command.py b/whatmaps/command.py index 6825f7e..43b7dab 100755 --- a/whatmaps/command.py +++ b/whatmaps/command.py @@ -43,7 +43,7 @@ def check_maps(procs, shared_objects): for proc in procs: for so in shared_objects: if proc.maps(so): - if restart_procs.has_key(proc.exe): + if proc.exe in restart_procs: restart_procs[proc.exe] += [ proc ] else: restart_procs[proc.exe] = [ proc ] @@ -178,7 +178,7 @@ def main(argv): if not pkg: logging.warning("No package found for '%s' - restart manually" % proc) else: - if pkgs.has_key(pkg.name): + if pkg.name in pkgs: pkgs[pkg.name].procs.append(proc) else: pkg.procs = [ proc ] |