From 3e07bd51fd251f3f0b7abcf38a745e87d60a8e09 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Buchillon Date: Wed, 18 Nov 2020 16:21:57 -0800 Subject: fw_update: fix python3 incompatibility In py3 bytearrays are real, so we need to use 'encode' to make sure the right command is being sent BRANCH=None BUG=chromium:1152838 TEST=None Change-Id: I28e6390d99563731f07e42a161065469aa009b11 Signed-off-by: Ruben Rodriguez Buchillon Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548685 Reviewed-by: Dossym Nurmukhanov (cherry picked from commit 6e0750fda26606378b1c6e3c4ca0457fa93b5a5b) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569998 Reviewed-by: Garry Wang --- extra/usb_updater/fw_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/usb_updater/fw_update.py b/extra/usb_updater/fw_update.py index 739fa2fe80..ebc7623ac2 100755 --- a/extra/usb_updater/fw_update.py +++ b/extra/usb_updater/fw_update.py @@ -257,7 +257,7 @@ class Supdate(object): offset += pagesize # Validate that the micro thinks it successfully wrote the data. - read = self.wr_command("", read_count=4) + read = self.wr_command(''.encode(), read_count=4) result = struct.unpack("