tests: Replace file() with open() to work with python3

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-02-04 16:11:42 +02:00
parent c37ef330d0
commit e50c58e585

View file

@ -236,7 +236,7 @@ class FstLauncher:
pid = -1 pid = -1
try: try:
for i in range(3): for i in range(3):
pf = file(pidfile, 'r') pf = open(pidfile, 'r')
pidtxt = pf.read().strip() pidtxt = pf.read().strip()
self.logger.debug("kill_pid: %s: '%s'" % (pidfile, pidtxt)) self.logger.debug("kill_pid: %s: '%s'" % (pidfile, pidtxt))
pf.close() pf.close()