diff options
author | Keith Haddow <haddowk@chromium.org> | 2022-05-28 11:11:25 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-31 04:59:25 +0000 |
commit | bc61f6d5fb8cb9c6facb664ecb10f9bcc18ef28e (patch) | |
tree | a47e78453fa928091a5dd85e75f048bdbf448c52 | |
parent | de261cb319ca04c87ed7e06dc818ef58d004635d (diff) | |
download | chrome-ec-bc61f6d5fb8cb9c6facb664ecb10f9bcc18ef28e.tar.gz |
ec console: Move from tostring to tobytes.
To string has been an alias for tobytes since python 3.2, in later
version of python ( 3.9 and beyond ) this alias is removed. https://bugs.python.org/issue38916
This is a save change as all of chrome dev is on 3.6 or better.
The error goes away but when using usb_console inside of a container
I get device busy errors as the servod is running.
BUG=b:234176994
TEST=built a servod with python 3.10 and tested usb_console.
Change-Id: I1b00b0dd96413490936e20aa28067324c9d8e9a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674943
Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Auto-Submit: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Commit-Queue: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
-rwxr-xr-x | extra/usb_serial/console.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/usb_serial/console.py b/extra/usb_serial/console.py index 7b3bacd903..d06b33ce23 100755 --- a/extra/usb_serial/console.py +++ b/extra/usb_serial/console.py @@ -192,7 +192,7 @@ class Suart(): try: r = self._susb._read_ep.read(64, self._susb.TIMEOUT_MS) if r: - GetBuffer(sys.stdout).write(r.tostring()) + GetBuffer(sys.stdout).write(r.tobytes()) GetBuffer(sys.stdout).flush() except Exception as e: |