From a5f5e7ed9b07b902af4438d76087e034abcba9b2 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sat, 12 Oct 2019 18:16:07 +0000 Subject: format python --- src/arm/test_gnunet_arm.py.in | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src/arm/test_gnunet_arm.py.in') diff --git a/src/arm/test_gnunet_arm.py.in b/src/arm/test_gnunet_arm.py.in index 1d067b5d9..9605c4eae 100644 --- a/src/arm/test_gnunet_arm.py.in +++ b/src/arm/test_gnunet_arm.py.in @@ -56,25 +56,41 @@ def fail(result): def end_arm_failer(command, rc, stdo, stde, normal): if normal: if rc != 0: - fail("FAIL: error running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) + fail( + "FAIL: error running {}\nCommand output was:\n{}\n{}".format( + command, stdo, stde + ) + ) else: if rc == 0: - fail("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) + fail( + "FAIL: expected error while running {}\nCommand output was:\n{}\n{}" + .format(command, stdo, stde) + ) def print_only_failer(command, rc, stdo, stde, normal): if normal: if rc != 0: - print("FAIL: error running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) + print( + "FAIL: error running {}\nCommand output was:\n{}\n{}".format( + command, stdo, stde + ) + ) sys.exit(1) else: if rc == 0: - print("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) + print( + "FAIL: expected error while running {}\nCommand output was:\n{}\n{}" + .format(command, stdo, stde) + ) sys.exit(1) def r_something(to_run, extra_args, failer=None, normal=True, **kw): - rc, stdo, stde = sub_run(to_run + extra_args, nofail=True, want_stde=True, **kw) + rc, stdo, stde = sub_run( + to_run + extra_args, nofail=True, want_stde=True, **kw + ) if failer is not None: failer(to_run + extra_args, rc, stdo, stde, normal) return (rc, stdo, stde) -- cgit v1.2.3