зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1820139 - Add an early return mechanism to line handling. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D171546
This commit is contained in:
Родитель
f0eef2cdca
Коммит
2907b87962
|
@ -47,6 +47,10 @@ if (
|
|||
_current_shell += ".exe"
|
||||
|
||||
|
||||
class LineHandlingEarlyReturn(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class ProcessExecutionMixin(LoggingMixin):
|
||||
"""Mix-in that provides process execution functionality."""
|
||||
|
||||
|
@ -111,7 +115,10 @@ class ProcessExecutionMixin(LoggingMixin):
|
|||
line = line.decode(sys.stdout.encoding or "utf-8", "replace")
|
||||
|
||||
if line_handler:
|
||||
try:
|
||||
line_handler(line)
|
||||
except LineHandlingEarlyReturn:
|
||||
return
|
||||
|
||||
if line.startswith("BUILDTASK") or not log_name:
|
||||
return
|
||||
|
|
Загрузка…
Ссылка в новой задаче