Skip to content

Commit bbc048d

Browse files
committed
cli.lwp3.repl: fix crash on Windows
Bleak on Windows doesn't cast data to bytes, so we have to do it ourselves.
1 parent c28d04e commit bbc048d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pybricksdev/cli/lwp3/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ async def welcome():
145145
logger.exception("bad input:")
146146
else:
147147
logger.info("sending: %s", msg)
148-
await client.write_gatt_char(LWP3_HUB_CHARACTERISTIC_UUID, msg)
148+
await client.write_gatt_char(LWP3_HUB_CHARACTERISTIC_UUID, bytes(msg))
149149

150150
logger.info("disconnecting...")
151151

0 commit comments

Comments
 (0)