[CRIU] [PATCH] test rpc: remove unnecessary import, close fd
Adrian Reber
adrian at lisas.de
Fri Jun 29 15:50:07 MSK 2018
From: Adrian Reber <areber at redhat.com>
Signed-off-by: Adrian Reber <areber at redhat.com>
---
test/others/rpc/read.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/others/rpc/read.py b/test/others/rpc/read.py
index 680069b..bbf69b6 100644
--- a/test/others/rpc/read.py
+++ b/test/others/rpc/read.py
@@ -5,12 +5,11 @@
# but the bash version on Ubuntu has probably the following bug:
# https://lists.gnu.org/archive/html/bug-bash/2017-07/msg00039.html
-import os
import sys
-
-f=open(sys.argv[1])
+f = open(sys.argv[1])
r = f.read(1)
+f.close()
if r == '\0':
sys.exit(0)
--
1.8.3.1
More information about the CRIU
mailing list