8000 Fix crash in gen_display_resources.py by lesamouraipourpre · Pull Request #5275 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Fix crash in gen_display_resources.py #5275

New issue

Have a question about this project? Sign up for a free GitHub accou 8000 nt 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

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

lesamouraipourpre
Copy link
@lesamouraipourpre lesamouraipourpre commented Aug 31, 2021

Currently, passing in a value for --extra_characters results in a crash

> python gen_display_resources.py --font fonts/ter-u12n.bdf --extra_characters ABCDEF --output_c_file ../test-output.c
Traceback (most recent call last):
  File "/home/user/prtesting/circuitpython/tools/gen_display_resources.py", line 57, in <module>
    all_characters.extend(args.extra_characters)
AttributeError: 'str' object has no attribute 'extend'

This fixes that crash by converting the all_characters string to a list.

Also, the description of the tool is corrected for argparse command line usage.

Edit:
Tested building and running on PyPortal

@tannewt tannewt self-requested a review August 31, 2021 16:57
Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 65753a1 into adafruit:main Aug 31, 2021
@lesamouraipourpre lesamouraipourpre deleted the gen-display-headers branch September 19, 2021 08:17
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
0