diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2020-02-13 15:51:36 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-14 08:52:40 +0000 |
commit | cbc6a9d99bdd4c7180f5e309de09039d6d9c9dbd (patch) | |
tree | 2e65a7782d8dd967641247c04cb8b45c010c9e57 /binary_search_tool | |
parent | ac96cb3e307c7edb96b05994b9deade0978c1e78 (diff) | |
download | toolchain-utils-cbc6a9d99bdd4c7180f5e309de09039d6d9c9dbd.tar.gz |
toolchain-utils: fix cros lint and some random errors
We have enabled --py3 for cros lint and thus reveals some new linting
errors in migrated scripts. This patch fixes them and some other random
errors.
BUG=chromium:1011676
TEST=Passed unittests.
Change-Id: If129e01c21845e1b944a2b64e50e9fed7138c845
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2055972
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Zhizhou Yang <zhizhouy@google.com>
Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
Diffstat (limited to 'binary_search_tool')
-rwxr-xr-x | binary_search_tool/binary_search_perforce.py | 2 | ||||
-rwxr-xr-x | binary_search_tool/test/binary_search_tool_test.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/binary_search_tool/binary_search_perforce.py b/binary_search_tool/binary_search_perforce.py index 5065f709..f2a3c8d5 100755 --- a/binary_search_tool/binary_search_perforce.py +++ b/binary_search_tool/binary_search_perforce.py @@ -369,7 +369,7 @@ class P4BinarySearcher(VCSBinarySearcher): self.ce.RunCommand(command) command = 'cd %s' % self.checkout_dir command += '; g4 changes -c %s' % self.client_name - _, out, _ = self.ce.RunCommandWOUTPUOT(command) + _, out, _ = self.ce.RunCommandWOutput(command) changes = re.findall(r'Change (\d+)', out) if changes: command = 'cd %s' % self.checkout_dir diff --git a/binary_search_tool/test/binary_search_tool_test.py b/binary_search_tool/test/binary_search_tool_test.py index ca9313b5..6f5b514e 100755 --- a/binary_search_tool/test/binary_search_tool_test.py +++ b/binary_search_tool/test/binary_search_tool_test.py @@ -202,7 +202,7 @@ class BisectingUtilsTest(unittest.TestCase): f.write('test123') bss = binary_search_state.MockBinarySearchState() - with self.assertRaises(binary_search_state.Error): + with self.assertRaises(OSError): bss.SaveState() with open(state_file, 'r', encoding='utf-8') as f: |