summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-04-22 13:14:56 +0200
committerGuido Günther <agx@sigxcpu.org>2014-04-22 13:35:00 +0200
commit5bbc7bf44383d6f924551465c29eff44828b788c (patch)
tree543b7b8c30f666d667613ddb22771b50bf112cc1
parent963efa4bebcdf8a73db0fac838cddd57492e7f06 (diff)
Use loops instead of list comprehension
since 2to3 would recommend this anyway
-rwxr-xr-xwhatmaps/command.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/whatmaps/command.py b/whatmaps/command.py
index 43b7dab..14e56b7 100755
--- a/whatmaps/command.py
+++ b/whatmaps/command.py
@@ -163,13 +163,14 @@ def main(argv):
logging.error("Cannot parse contents of %s" % pkg.name)
return 1
logging.debug("Found shared objects:")
- map(lambda x: logging.debug(" %s", x), shared_objects)
+ for so in shared_objects:
+ logging.debug(" %s", so)
# Find processes that map them
restart_procs = check_maps(get_all_pids(), shared_objects)
logging.debug("Processes that map them:")
- map(lambda (x, y): logging.debug(" Exe: %s Pids: %s", x, y),
- restart_procs.items())
+ for exe, pids in restart_procs.items():
+ logging.debug(" Exe: %s Pids: %s", exe, pids),
# Find packages that contain the binaries of these processes
pkgs = {}
@@ -185,8 +186,8 @@ def main(argv):
pkgs[pkg.name] = pkg
logging.info("Packages that ship the affected binaries:")
- map(lambda x: logging.info(" Pkg: %s, binaries: %s" % (x.name, x.procs)),
- pkgs.values())
+ for pkg in pkgs.values():
+ logging.info(" Pkg: %s, binaries: %s" % (pkg.name, pkg.procs))
all_services = set()
try: