Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e1ef16d

Browse files
Clement Skaucommit-bot@chromium.org
authored andcommitted
[Presubmit] Fixes presubmit for breaking API change.
The API change happened in: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2079411 Change-Id: I1c826f102c1366c193a75fb5e17a355dad34cbc3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137977 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Clement Skau <cskau@google.com>
1 parent fdca1f3 commit e1ef16d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

runtime/PRESUBMIT.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ def CheckFormatted(input_api, output_api):
5959
def convert_warning_to_error(presubmit_result):
6060
if not presubmit_result.fatal:
6161
# Convert this warning to an error.
62-
stream = StringIO.StringIO()
63-
presubmit_result.handle(stream)
64-
message = stream.getvalue()
65-
return output_api.PresubmitError(message)
62+
result_json = presubmit_result.json_format()
63+
return output_api.PresubmitError(
64+
message=result_json['message'],
65+
items=result_json['items'],
66+
long_text=result_json['long_text'])
6667
return presubmit_result
6768

6869
results = input_api.canned_checks.CheckPatchFormatted(input_api, output_api)

0 commit comments

Comments
 (0)