diff options
author | Ruben Rodriguez Buchillon <coconutruben@chromium.org> | 2021-04-06 19:14:38 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-22 02:54:44 +0000 |
commit | a18259036ddc0f1a2cf9673772ba03360aac3b74 (patch) | |
tree | 417bd50cf158ca27727d14323cd541c916a15b6f /util/lbplay.c | |
parent | 97f1427e200b70d0654d7391f45697f48d1a3d4c (diff) | |
download | chrome-ec-a18259036ddc0f1a2cf9673772ba03360aac3b74.tar.gz |
console: make sure eol check runs in python3
Indexing into a byte array returns an integer, which will return False
when compared to a byte-array. This change makes sure we're comparing
two characters (python2) or two integers (python3)
BRANCH=None
BUG=b:183642673
TEST=python3
b'hello\n'[-1]==b'\n'
False
TEST=python2.7
b'hello\n'[-1]==b'\n'
True
TEST=python3
b'hello\n'[-1]==b'\n'[0]
True
Change-Id: I26a4b1bde7acf733faae7ec355da228d76e261d0
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809883
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'util/lbplay.c')
0 files changed, 0 insertions, 0 deletions