diff options
author | Yilin Yang <kerker@google.com> | 2020-09-26 14:30:51 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-29 11:18:50 +0000 |
commit | 60f8307462bbb8dad78985f4321a2740bd0e828c (patch) | |
tree | eebd3e21385067ba1003e294a2c084277965a193 /extra | |
parent | 9b85ad15175b890f8e5f0a5e2d827c98af8fd632 (diff) | |
download | chrome-ec-60f8307462bbb8dad78985f4321a2740bd0e828c.tar.gz |
tigertool: Migrate tigertool.py to python2/3 compatible
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: I50b9aa6724bc6d9db5c7f743909d81c0b2dfc849
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431319
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'extra')
-rwxr-xr-x | extra/tigertool/tigertool.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extra/tigertool/tigertool.py b/extra/tigertool/tigertool.py index a3c25e3ad6..21b046c1d3 100755 --- a/extra/tigertool/tigertool.py +++ b/extra/tigertool/tigertool.py @@ -1,10 +1,12 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to control tigertail USB-C Mux board.""" +# Note: This is a py2/3 compatible file. + import argparse import sys import time @@ -125,7 +127,7 @@ def do_power(count, bus, pty): 'Power : \S+ \S+ (\d+) mW\s+' \ 'Current : \S+ \S+ (\d+) mA' - for i in xrange(0, count): + for i in range(0, count): results = pty._issue_cmd_get_results(cmd, [regex])[0] c.log('%.2f,\t%s,\t%s\t%s' % (time.time() - start, results[1], results[2], results[3])) |