summaryrefslogtreecommitdiff
path: root/Tools/patchcheck/patchcheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/patchcheck/patchcheck.py')
-rwxr-xr-xTools/patchcheck/patchcheck.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/patchcheck/patchcheck.py b/Tools/patchcheck/patchcheck.py
index 6dcf612066..44a6fb8c66 100755
--- a/Tools/patchcheck/patchcheck.py
+++ b/Tools/patchcheck/patchcheck.py
@@ -130,9 +130,10 @@ def changed_files(base_branch=None):
with subprocess.Popen(cmd.split(),
stdout=subprocess.PIPE,
cwd=SRCDIR) as st:
- if st.wait() != 0:
+ git_file_status, _ = st.communicate()
+ if st.returncode != 0:
sys.exit(f'error running {cmd}')
- for line in st.stdout:
+ for line in git_file_status.splitlines():
line = line.decode().rstrip()
status_text, filename = line.split(maxsplit=1)
status = set(status_text)