testing: support python3 in headless_python_unittests.py

Bug: 1340449
Change-Id: I364fce6f0b86f0129e8f9e94de744c59dea115ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3734707
Reviewed-by: Sami Kyöstilä <[email protected]>
Reviewed-by: Brian Sheedy <[email protected]>
Commit-Queue: Sami Kyöstilä <[email protected]>
Auto-Submit: Takuto Ikuta <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1019917}
diff --git a/testing/scripts/headless_python_unittests.py b/testing/scripts/headless_python_unittests.py
index 4e32907..cb0bb375 100755
--- a/testing/scripts/headless_python_unittests.py
+++ b/testing/scripts/headless_python_unittests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env vpython3
 # Copyright 2016 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -38,7 +38,7 @@
   valid = bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
                ((rc == 0) or failures))
   common.record_local_script_results(
-      'headless_python_unittests', args.output, failures.keys(), valid)
+      'headless_python_unittests', args.output, list(failures.keys()), valid)
 
   return rc