aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/update_all_tryjobs_with_auto.py
diff options
context:
space:
mode:
authorSalud Lemus <saludlemus@google.com>2019-09-04 18:15:35 -0700
committerSalud Lemus <saludlemus@google.com>2019-09-09 20:23:50 +0000
commit6270cccfcd886478a9c1b20acf9e8cd50a673a19 (patch)
treef9b5938b388f0be67333882113a2e66e1a969860 /llvm_tools/update_all_tryjobs_with_auto.py
parent2ad170bf822e26b07b4ed69f500be2ca9a5c3df1 (diff)
downloadtoolchain-utils-6270cccfcd886478a9c1b20acf9e8cd50a673a19.tar.gz
LLVM tools: Migrated all scripts to python3
This CL includes changes such as replacements of `\'` with `"` and adding extra debugging output to some scripts. Currently, the scripts are in python2, so migrating them to python3 so they are more maintainable. BUG=None TEST=Ran each script by itself with various input (e.g. different google3, tot, etc.). Change-Id: Ib72b7744c6f7c13711c2db427f6524ff3cbc6205 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1787738 Tested-by: Salud Lemus <saludlemus@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'llvm_tools/update_all_tryjobs_with_auto.py')
-rwxr-xr-xllvm_tools/update_all_tryjobs_with_auto.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm_tools/update_all_tryjobs_with_auto.py b/llvm_tools/update_all_tryjobs_with_auto.py
index 4a670c34..511bfffa 100755
--- a/llvm_tools/update_all_tryjobs_with_auto.py
+++ b/llvm_tools/update_all_tryjobs_with_auto.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -13,7 +13,6 @@ import json
import os
from assert_not_in_chroot import VerifyOutsideChroot
-from patch_manager import _ConvertToASCII
from update_tryjob_status import GetAutoResult
from update_tryjob_status import TryjobStatus
@@ -51,7 +50,7 @@ def GetCommandLineArgs():
if not os.path.isfile(args_output.last_tested) or \
not args_output.last_tested.endswith('.json'):
- raise ValueError('File does not exist or does not ending in \'.json\' '
+ raise ValueError('File does not exist or does not ending in ".json" '
': %s' % args_output.last_tested)
return args_output
@@ -65,7 +64,7 @@ def main():
args_output = GetCommandLineArgs()
with open(args_output.last_tested) as tryjobs:
- bisect_contents = _ConvertToASCII(json.load(tryjobs))
+ bisect_contents = json.load(tryjobs)
for tryjob in bisect_contents['jobs']:
if tryjob['status'] == TryjobStatus.PENDING.value: