Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix str vs bytes issue in Console #426

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

unicornsasfuel
Copy link
Contributor

Fixes a bug in greatfet console that causes runtime errors on Windows and in certain cases on nix-based OSes when using greatfet uart functionality.

NTConsole (and in certain cases POSIXConsole) emit str types when keys are pressed, greatfet_uart.py is written to expect keys as bytestring. Since Console is currently only used by the UART functionality, this commit changes the Console to return only bytestrings when polled for keypresses.

Fixes a bug in greatfet console that causes runtime errors on Windows and in certain cases on nix-based OSes when using greatfet uart functionality.

NTConsole (and in certain cases POSIXConsole) emit `str` types when keys are pressed, `greatfet_uart.py` is written to expect keys as `bytestring`. Since Console is currently only used by the UART functionality, this commit changes the Console to return only `bytestring`s when polled for keypresses.
@antoinevg antoinevg merged commit 7241930 into greatscottgadgets:master Feb 3, 2024
1 check passed
@antoinevg
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants