diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2019-12-23 16:56:26 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-09 07:34:17 +0000 |
commit | 45e4c1f8be303b43030e3dfac6cab5cd67d10a99 (patch) | |
tree | f00931a3bf505fded2f375f7589b41e6dfc34f18 /cros_utils/no_pseudo_terminal_test.py | |
parent | e41baa8073f6f5d160ef8cf75ccb7ca9beb1ad72 (diff) | |
download | toolchain-utils-45e4c1f8be303b43030e3dfac6cab5cd67d10a99.tar.gz |
toolchain-utils: Migrate cros_utils to python3
This patch fixes all presubmit checks in cros_utils and migrated it from
python2 to python3.
TEST=Passed all unittests and presubmit checks.
BUG=chromium:1011676
Change-Id: I3a7097d6570fb2cb4e5dcdd5ae22f30c5c5762e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1981087
Commit-Queue: Zhizhou Yang <zhizhouy@google.com>
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'cros_utils/no_pseudo_terminal_test.py')
-rwxr-xr-x | cros_utils/no_pseudo_terminal_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cros_utils/no_pseudo_terminal_test.py b/cros_utils/no_pseudo_terminal_test.py index 41d71539..10fd9608 100755 --- a/cros_utils/no_pseudo_terminal_test.py +++ b/cros_utils/no_pseudo_terminal_test.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. @@ -27,6 +27,7 @@ class NoPsuedoTerminalTest(unittest.TestCase): """Attaches strace to the current process.""" args = ['sudo', 'strace', '-o', output_file, '-p', str(os.getpid())] print(args) + # pylint: disable=bad-option-value, subprocess-popen-preexec-fn self._strace_process = subprocess.Popen(args, preexec_fn=os.setpgrp) # Wait until we see some activity. start_time = time.time() |