From fe110214b16a38a682cfc5d53c48083ea249a94d Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Tue, 9 Jan 2024 18:39:24 -0700 Subject: [PATCH] sendto: Format with yapf Signed-off-by: Nathan Chancellor --- sendto | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sendto b/sendto index 1df3601..04011ac 100755 --- a/sendto +++ b/sendto @@ -2,11 +2,11 @@ import subprocess import sys from os.path import exists + GET_MAINTAINER_PATH = "./scripts/get_maintainer.pl" if not exists(GET_MAINTAINER_PATH): raise Exception(f"Can't find {GET_MAINTAINER_PATH}, " - "are you in linux directory?" - ) + "are you in linux directory?") argv = sys.argv if len(argv) < 2: @@ -15,12 +15,12 @@ if argv[1][-6:] != '.patch': raise Exception("Need .patch file (check arg)") cmd = [f"{GET_MAINTAINER_PATH}", argv[1]] try: - result = subprocess.run(cmd, stdout=subprocess.PIPE, + result = subprocess.run(cmd, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) except: print(f"subprocess.run failure... " - "Potentially lacking permissions for {GET_MAINTAINER_PATH}" - ) + "Potentially lacking permissions for {GET_MAINTAINER_PATH}") get_maintainer_output = result.stdout.decode('UTF-8') get_maintainer_errors = result.stderr.decode('UTF-8') @@ -31,9 +31,9 @@ lines = [] for line in get_maintainer_output.split('\n')[:-1]: line = line.strip() idx_of_paren = line.index('(') - before = line[0:idx_of_paren-1] + before = line[0:idx_of_paren - 1] before = before.replace('"', '') - after = line[idx_of_paren+1:-1] + after = line[idx_of_paren + 1:-1] lines.append((before, after)) TO = '--to '