mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
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>
This commit is contained in:
parent
5ff4fcb753
commit
5aa72e7237
28 changed files with 5738 additions and 5167 deletions
|
|
@ -13,17 +13,17 @@ sport = os.getenv("TCP_SPORT", "12345")
|
|||
dport = os.getenv("TCP_DPORT", "54321")
|
||||
|
||||
print(sys.argv[1])
|
||||
args = [sys.argv[1],
|
||||
"--addr", src, "--port", sport, "--seq", "555",
|
||||
"--next",
|
||||
"--addr", dst, "--port", dport, "--seq", "666",
|
||||
"--reverse", "--", "./tcp-test.py"]
|
||||
args = [
|
||||
sys.argv[1], "--addr", src, "--port", sport, "--seq", "555", "--next",
|
||||
"--addr", dst, "--port", dport, "--seq", "666", "--reverse", "--",
|
||||
"./tcp-test.py"
|
||||
]
|
||||
|
||||
p1 = Popen(args + ["dst"], stdout = PIPE, stdin = PIPE)
|
||||
p1 = Popen(args + ["dst"], stdout=PIPE, stdin=PIPE)
|
||||
|
||||
args.remove("--reverse");
|
||||
args.remove("--reverse")
|
||||
|
||||
p2 = Popen(args + ["src"], stdout = PIPE, stdin = PIPE)
|
||||
p2 = Popen(args + ["src"], stdout=PIPE, stdin=PIPE)
|
||||
|
||||
p1.stdout.read(5)
|
||||
p2.stdout.read(5)
|
||||
|
|
@ -42,7 +42,7 @@ str2 = m.hexdigest()
|
|||
|
||||
if str2 != eval(s):
|
||||
print("FAIL", repr(str2), repr(s))
|
||||
sys.exit(5);
|
||||
sys.exit(5)
|
||||
|
||||
s = p1.stdout.read()
|
||||
m = hashlib.md5()
|
||||
|
|
@ -52,7 +52,7 @@ str1 = m.hexdigest()
|
|||
s = p2.stdout.read()
|
||||
if str1 != eval(s):
|
||||
print("FAIL", repr(str1), s)
|
||||
sys.exit(5);
|
||||
sys.exit(5)
|
||||
|
||||
if p1.wait():
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue