Commit 7e5e1ff2 authored by Radostin Stoyanov's avatar Radostin Stoyanov Committed by Pavel Emelyanov

test: Don't leak file descriptor

Signed-off-by: 's avatarRadostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent d76ddb5e
...@@ -14,7 +14,7 @@ def create_fds(): ...@@ -14,7 +14,7 @@ def create_fds():
os.rmdir(tdir) os.rmdir(tdir)
mnt_id = -1; mnt_id = -1;
f = open("/proc/self/fdinfo/%d" % fd1.fileno()) with open("/proc/self/fdinfo/%d" % fd1.fileno()) as f:
for l in f: for l in f:
l = l.split() l = l.split()
if l[0] == "mnt_id:": if l[0] == "mnt_id:":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment