mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 18:19:39 +00:00
test/others: drop setup_swrk() py2 compatibility
This patch removes the code introduced for compatibility with Python 2 in commits:4c1ee3e227test/other: Resolve Py3 compatibility issues6b615ca152test/others: Reuse setup_swrk() Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
cc5742d707
commit
a8cfec9dc4
1 changed files with 1 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue