diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-02-24 20:04:03 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-02-24 20:04:03 +0100 |
commit | 4e704c27a7014d0b1cd660b9f5c233787a798c14 (patch) | |
tree | 28fdf35c22d5fbdfe310a427c90e9c31ae86744e /whatmaps/command.py | |
parent | a2e8aeb34bc615cc9c0082951721971bb141f20a (diff) | |
parent | 11ca10034c04267da8b00d2ef940b0548a13ef42 (diff) |
Merge branch 'master' into debian/master
Diffstat (limited to 'whatmaps/command.py')
-rwxr-xr-x | whatmaps/command.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/whatmaps/command.py b/whatmaps/command.py index c39b06d..0f8e433 100755 --- a/whatmaps/command.py +++ b/whatmaps/command.py @@ -1,4 +1,4 @@ -#!/usr/bin/python -u +#!/usr/bin/python3 -u # vim: set fileencoding=utf-8 : # # (C) 2010,2014 Guido Günther <agx@sigxcpu.org> @@ -16,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -from __future__ import print_function + import errno import glob @@ -83,7 +83,7 @@ def find_pkgs(procs, distro): if pkgs: logging.info("Packages that ship the affected binaries:") - for pkg in pkgs.values(): + for pkg in list(pkgs.values()): logging.info(" Pkg: %s, binaries: %s" % (pkg.name, pkg.procs)) return pkgs @@ -96,7 +96,7 @@ def find_services(pkgs, distro): """ all_services = set() - for pkg in pkgs.values(): + for pkg in list(pkgs.values()): services = set(pkg.services + distro.pkg_services(pkg)) services -= set(distro.pkg_service_blacklist(pkg)) if not services: @@ -112,7 +112,7 @@ def find_systemd_units(procmap, distro): """Find systemd units that contain the given processes""" units = set() - for dummy, procs in procmap.items(): + for dummy, procs in list(procmap.items()): for proc in procs: try: unit = Systemd.process_to_unit(proc) @@ -201,7 +201,7 @@ def main(argv): else: raise logging.debug("Processes that map them:") - for exe, pids in restart_procs.items(): + for exe, pids in list(restart_procs.items()): logging.debug(" Exe: %s Pids: %s", exe, pids), if Systemd.is_running(): |