Skip to content

Handle missing bitmaptools #56

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

Merged
merged 3 commits into from
Nov 26, 2021
Merged

Handle missing bitmaptools #56

merged 3 commits into from
Nov 26, 2021

Conversation

rsbohn
Copy link
Contributor

@rsbohn rsbohn commented Nov 26, 2021

If bitmaptools is missing an ImportError will be raised.
This handles the correct Error.

If bitmaptools is not available an ImportError is raised.
As @FoamyGuy pointed out, you may have one or the other library, both or none.
This handles the combinations properly.
@ladyada
Copy link
Member

ladyada commented Nov 26, 2021

didnt test!

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Looks good to me. I confirmed on a TrinketM0 that the exception raised is an ImportError not a NameError So these changes do resolve the catching of the incorrect error type.

Thanks for the fix @rsbohn

@FoamyGuy FoamyGuy merged commit 058da16 into adafruit:main Nov 26, 2021
@rsbohn
Copy link
Contributor Author

rsbohn commented Nov 26, 2021

Thank you!

@rsbohn rsbohn deleted the dexter1126 branch November 26, 2021 19:18
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 27, 2021
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.

3 participants