From beb877fe49423aafd5c382916937f5445395ca10 Mon Sep 17 00:00:00 2001 From: Robert Brandt Date: Thu, 14 May 2020 20:05:34 +0000 Subject: [PATCH] depot_tools: bugfix for py3 syntax and bytes/str changes Also update copywrite header to conform to expectations. BUG=chromium:1082354 TEST=locally, can upload commit with this fix Change-Id: I5527cf9cc58fbab94f777b82008a422a3190f539 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2199884 Commit-Queue: Edward Lesmes Reviewed-by: Edward Lesmes --- presubmit_canned_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 3e4d8bdbee..ef1984e8b7 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -1513,7 +1513,7 @@ def CheckChangedLUCIConfigs(input_api, output_api): req.add_header('Authorization', 'Bearer %s' % acc_tkn.token) if body is not None: req.add_header('Content-Type', 'application/json') - req.add_data(json.dumps(body)) + req.data = json.dumps(body).encode('utf-8') return json.load(input_api.urllib_request.urlopen(req)) try: