diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-20 14:24:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-20 14:24:09 -0400 |
commit | 79b8849d4c1e73df2a79a1d5a5f6166d0dd67a12 (patch) | |
tree | b630c9a63287d8586b85f2bdd00af56353c66b25 /tools/patman/cros_subprocess.py | |
parent | 11c41192ec08ba6ded60b0d6e8257cfbd6ad1914 (diff) | |
parent | f0045799c6957e374cc12a6146ac60881cd827d6 (diff) |
Merge tag 'u-boot-imx-20211020' of https://source.denx.de/u-boot/custodians/u-boot-imx
u-boot-imx-20211020
-------------------
First PR from u-boot-imx for 2022.01
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535
- new board: kontron-sl-mx8mm
- imx8m:
- fix secure boot
- imx ESDHC: fixes
- i.MX53: Support thum2, bmode and fixes for Menlo board
usbarmory switch to Ethernet driver model
- imx6 :
- DDR calibration for Toradex boards
- imx7:
- Fixes
- Updated gateworks boards (ventana / venice)
# gpg verification failed.
Diffstat (limited to 'tools/patman/cros_subprocess.py')
-rw-r--r-- | tools/patman/cros_subprocess.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/patman/cros_subprocess.py b/tools/patman/cros_subprocess.py index fdd51386856..88a4693feff 100644 --- a/tools/patman/cros_subprocess.py +++ b/tools/patman/cros_subprocess.py @@ -128,6 +128,9 @@ class Popen(subprocess.Popen): sys.stdout or sys.stderr. data: a string containing the data + Returns: + True to terminate the process + Note: The data read is buffered in memory, so do not use this method if the data size is large or unlimited. @@ -175,6 +178,7 @@ class Popen(subprocess.Popen): stderr = bytearray() combined = bytearray() + stop_now = False input_offset = 0 while read_set or write_set: try: @@ -212,7 +216,7 @@ class Popen(subprocess.Popen): stdout += data combined += data if output: - output(sys.stdout, data) + stop_now = output(sys.stdout, data) if self.stderr in rlist: data = b'' # We will get an error on read if the pty is closed @@ -227,7 +231,9 @@ class Popen(subprocess.Popen): stderr += data combined += data if output: - output(sys.stderr, data) + stop_now = output(sys.stderr, data) + if stop_now: + self.terminate() # All data exchanged. Translate lists into strings. stdout = self.ConvertData(stdout) |