summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Rodriguez Buchillon <coconutruben@chromium.org>2020-11-18 16:21:57 -0800
committerCommit Bot <commit-bot@chromium.org>2020-12-03 19:10:08 +0000
commit3e07bd51fd251f3f0b7abcf38a745e87d60a8e09 (patch)
tree6c70f5e1b5e0daccfef0b56acc39da11dc292601
parent2b9666556feda37e6fda9c081dd7403ea8b6ec3f (diff)
downloadchrome-ec-3e07bd51fd251f3f0b7abcf38a745e87d60a8e09.tar.gz
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 <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548685 Reviewed-by: Dossym Nurmukhanov <dossym@chromium.org> (cherry picked from commit 6e0750fda26606378b1c6e3c4ca0457fa93b5a5b) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569998 Reviewed-by: Garry Wang <xianuowang@chromium.org>
-rwxr-xr-xextra/usb_updater/fw_update.py2
1 files changed, 1 insertions, 1 deletions
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("<I", read)
result = result[0]
if result != 0: