summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-02-06 12:28:03 +0100
committerGuido Günther <agx@sigxcpu.org>2016-02-24 20:01:20 +0100
commit11ca10034c04267da8b00d2ef940b0548a13ef42 (patch)
tree4dbcb565d2afd2cac20eba2727a1f0e9dfd43914
parent7e838a0c18f3ad0f574e3bd7c5c4949701264f01 (diff)
Use python3 instead of python2
-rw-r--r--setup.py2
-rwxr-xr-xwhatmaps/command.py12
-rw-r--r--whatmaps/debiandistro.py2
-rw-r--r--whatmaps/process.py1
-rw-r--r--whatmaps/redhatdistro.py1
5 files changed, 8 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index cdadd50..be05caa 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# vim: set fileencoding=utf-8 :
#
# (C) 2010,2014 Guido Günther <agx@sigxcpu.org>
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():
diff --git a/whatmaps/debiandistro.py b/whatmaps/debiandistro.py
index 2725265..32f3774 100644
--- a/whatmaps/debiandistro.py
+++ b/whatmaps/debiandistro.py
@@ -166,7 +166,7 @@ class DebianDistro(Distro):
security_update_origins = klass._security_update_origins()
security_updates = {}
- for pkg in pkgs.values():
+ for pkg in list(pkgs.values()):
cache_pkg = cache[pkg.name]
for cache_version in cache_pkg.version_list:
if pkg.version == cache_version.ver_str:
diff --git a/whatmaps/process.py b/whatmaps/process.py
index 23ed7ab..a39da89 100644
--- a/whatmaps/process.py
+++ b/whatmaps/process.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python -u
# vim: set fileencoding=utf-8 :
#
# (C) 2010,2014 Guido Günther <agx@sigxcpu.org>
diff --git a/whatmaps/redhatdistro.py b/whatmaps/redhatdistro.py
index 9300648..0427c30 100644
--- a/whatmaps/redhatdistro.py
+++ b/whatmaps/redhatdistro.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python -u
# vim: set fileencoding=utf-8 :
#
# (C) 2010,2014 Guido Günther <agx@sigxcpu.org>