diff options
author | Ruben Rodriguez Buchillon <coconutruben@chromium.org> | 2020-11-18 16:55:32 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-21 06:38:28 +0000 |
commit | 6719aaa6b470b1732863fd6c003fa638016c4169 (patch) | |
tree | 151315fbe49325c66c39b2080766e4727c156300 | |
parent | 2acde897be905170a0825b5a29dd25fdcd1c4139 (diff) | |
download | chrome-ec-6719aaa6b470b1732863fd6c003fa638016c4169.tar.gz |
ec3po: make py3 and py2 compatible wrt imports
This change uses absolute imports in the console, and the unittest files so
that they work on py2 and py3
BUG=b:173654723
BRANCH=None
TEST=sudo servod
Change-Id: Ic4a8d567625108bbaee4b981016df55ba887da1d
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575379
Reviewed-by: Matthew Blecker <matthewb@chromium.org>
-rw-r--r-- | util/ec3po/__init__.py | 4 | ||||
-rwxr-xr-x | util/ec3po/console.py | 4 | ||||
-rwxr-xr-x | util/ec3po/console_unittest.py | 6 | ||||
-rwxr-xr-x | util/ec3po/interpreter_unittest.py | 4 |
4 files changed, 7 insertions, 11 deletions
diff --git a/util/ec3po/__init__.py b/util/ec3po/__init__.py index 9bebfa5842..376ffdba04 100644 --- a/util/ec3po/__init__.py +++ b/util/ec3po/__init__.py @@ -19,7 +19,3 @@ could be something like autotest. The interpreter is also responsible for the automatic command retrying if the EC drops a character in a command. This is a stopgap until all commands are communicated via host commands. """ - -import console -import interpreter -import threadproc_shim diff --git a/util/ec3po/console.py b/util/ec3po/console.py index aec237ac16..910e6b9114 100755 --- a/util/ec3po/console.py +++ b/util/ec3po/console.py @@ -30,8 +30,8 @@ import traceback import six -import interpreter -import threadproc_shim +from ec3po import interpreter +from ec3po import threadproc_shim PROMPT = b'> ' diff --git a/util/ec3po/console_unittest.py b/util/ec3po/console_unittest.py index 66f47be358..1555a92bc5 100755 --- a/util/ec3po/console_unittest.py +++ b/util/ec3po/console_unittest.py @@ -18,9 +18,9 @@ import unittest import six -import console -import interpreter -import threadproc_shim +from ec3po import console +from ec3po import interpreter +from ec3po import threadproc_shim ESC_STRING = six.int2byte(console.ControlKey.ESC) diff --git a/util/ec3po/interpreter_unittest.py b/util/ec3po/interpreter_unittest.py index bd328496f9..974b6640f3 100755 --- a/util/ec3po/interpreter_unittest.py +++ b/util/ec3po/interpreter_unittest.py @@ -17,8 +17,8 @@ import unittest import six -import interpreter -import threadproc_shim +from ec3po import interpreter +from ec3po import threadproc_shim def GetBuiltins(func): |