summaryrefslogtreecommitdiff
path: root/extra
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-11-19 01:36:30 +0000
commit6e0750fda26606378b1c6e3c4ca0457fa93b5a5b (patch)
treed74d6d3d5be100a4396a366f5a2464bf5db0eb45 /extra
parent07f5ec6691d2442498b303ab2c1e2edc588bd29a (diff)
downloadchrome-ec-6e0750fda26606378b1c6e3c4ca0457fa93b5a5b.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=None 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>
Diffstat (limited to 'extra')
-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 910f124c94..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(b"", read_count=4)
+ read = self.wr_command(''.encode(), read_count=4)
result = struct.unpack("<I", read)
result = result[0]
if result != 0: