From a8cfec9dc43537e834a2d439927dfd8750476037 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Thu, 22 Jun 2023 03:11:20 +0100 Subject: [PATCH] test/others: drop setup_swrk() py2 compatibility This patch removes the code introduced for compatibility with Python 2 in commits: 4c1ee3e227045fc1dc07b10ac7a538a68299693b test/other: Resolve Py3 compatibility issues 6b615ca15277fc14b52a09b4eb18314b7c6cbe75 test/others: Reuse setup_swrk() Signed-off-by: Radostin Stoyanov --- test/others/rpc/setup_swrk.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/others/rpc/setup_swrk.py b/test/others/rpc/setup_swrk.py index c7f84f952..ffaa01de4 100644 --- a/test/others/rpc/setup_swrk.py +++ b/test/others/rpc/setup_swrk.py @@ -5,12 +5,6 @@ import subprocess def setup_swrk(): print('Connecting to CRIU in swrk mode.') s1, s2 = socket.socketpair(socket.AF_UNIX, socket.SOCK_SEQPACKET) - - kwargs = {} - if sys.version_info.major == 3: - kwargs["pass_fds"] = [s1.fileno()] - - swrk = subprocess.Popen(['./criu', "swrk", "%d" % s1.fileno()], **kwargs) + swrk = subprocess.Popen(['./criu', "swrk", "%d" % s1.fileno()], pass_fds=[s1.fileno()]) s1.close() return swrk, s2 -