Convert file objects to strings, before passing to PresubmitNotifyResult

Json support, added in
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1666250,
breaks with object which aren't serializable.

Bug: chromium:971895
Change-Id: I36be5a548f8b82d4969fb38c34521e8df1a0b4c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143882
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28384}
This commit is contained in:
Niels Möller 2019-06-26 12:58:27 +02:00 committed by Commit Bot
parent 7dd9969547
commit 1d20185afd

View file

@ -175,11 +175,11 @@ def CheckNativeApiHeaderChanges(input_api, output_api):
if path == 'api': if path == 'api':
# Special case: Subdirectories included. # Special case: Subdirectories included.
if dn == 'api' or dn.startswith('api/'): if dn == 'api' or dn.startswith('api/'):
files.append(f) files.append(f.LocalPath())
else: else:
# Normal case: Subdirectories not included. # Normal case: Subdirectories not included.
if dn == path: if dn == path:
files.append(f) files.append(f.LocalPath())
if files: if files:
return [output_api.PresubmitNotifyResult(API_CHANGE_MSG, files)] return [output_api.PresubmitNotifyResult(API_CHANGE_MSG, files)]