2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-02 15:25:21 +00:00

test: make zdtm.py python2/python3 compatible

Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Andrei Vagin
2018-06-02 00:02:51 +03:00
committed by Pavel Emelyanov
parent a674859195
commit 00ed1eeb1a
5 changed files with 131 additions and 126 deletions

View File

@@ -3,7 +3,7 @@ import os
def create_fds():
(sk1, sk2) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
return (sk1.makefile("w"), sk2.makefile("r"))
return (sk1.makefile("wb"), sk2.makefile("rb"))
def __sock_ino(sockf):
return os.fstat(sockf.fileno()).st_ino