diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-04-22 13:06:53 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-04-22 13:34:54 +0200 |
commit | 963efa4bebcdf8a73db0fac838cddd57492e7f06 (patch) | |
tree | f351f3e88e0cdda5fc3ed3ed6790ead86144e4de /whatmaps/command.py | |
parent | 22aee94f7702a82e428e2915ba26cbcec209b391 (diff) |
Use 'in' instead of 'has_key'
which doesn't exit in Python3
Diffstat (limited to 'whatmaps/command.py')
-rwxr-xr-x | whatmaps/command.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 ] |