2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00
criu/test/inhfd/pipe.py
Andrei Vagin 5aa72e7237 py: Reformat everything into pep8 style
As discussed on the mailing list, current .py files formatting does not
conform to the world standard, so we should better reformat it. For this
the yapf tool is used. The command I used was

  yapf -i $(find -name *.py)

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2019-09-07 15:59:56 +03:00

18 lines
302 B
Python
Executable File

import os
def create_fds():
pipes = []
for i in range(10):
(fd1, fd2) = os.pipe()
pipes.append((os.fdopen(fd2, "wb"), os.fdopen(fd1, "rb")))
return pipes
def filename(pipef):
return 'pipe:[%d]' % os.fstat(pipef.fileno()).st_ino
def dump_opts(sockf):
return []