summaryrefslogtreecommitdiff
path: root/whatmaps
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-04-22 12:34:12 +0200
committerGuido Günther <agx@sigxcpu.org>2014-04-22 13:34:43 +0200
commit162aac994118c7e240530fdf4a652dbb2f35ac10 (patch)
tree854aa8e0c7c8e9566d95d3309d05f0cc1ce72828 /whatmaps
parentc8fa189693ec797d6d329f7c1b5ceeecda930574 (diff)
Use 'open' instead of 'file'
since the later doesn't exist in python3
Diffstat (limited to 'whatmaps')
-rwxr-xr-xwhatmaps/command.py2
-rw-r--r--whatmaps/process.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/whatmaps/command.py b/whatmaps/command.py
index 29a244f..6825f7e 100755
--- a/whatmaps/command.py
+++ b/whatmaps/command.py
@@ -96,7 +96,7 @@ def detect_distro():
def write_cmd_file(services, cmd_file, distro):
"Write out commands needed to restart the services to a file"
- out = file(cmd_file, 'w')
+ out = open(cmd_file, 'w')
print >>out, '#! /bin/sh'
for service in services:
logging.debug("Need to restart %s", service)
diff --git a/whatmaps/process.py b/whatmaps/process.py
index 3fe23f3..f3d5dcd 100644
--- a/whatmaps/process.py
+++ b/whatmaps/process.py
@@ -53,7 +53,7 @@ class Process(object):
def _read_maps(self):
"""Read the SOs from /proc/<pid>/maps"""
try:
- f = file(self._procpath('%d/maps' % self.pid))
+ f = open(self._procpath('%d/maps' % self.pid))
except IOError as e:
# ignore killed process
if e.errno != errno.ENOENT: