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

eeprom.py SMBus needs to be closed #159

Open
sleepydog3 opened this issue Mar 15, 2023 · 1 comment
Open

eeprom.py SMBus needs to be closed #159

sleepydog3 opened this issue Mar 15, 2023 · 1 comment

Comments

@sleepydog3
Copy link

You need to close the SMBus in read_eeprom. Best place would be in a finally part of the try. See https://pypi.org/project/smbus2/ example

@Gadgetoid
Copy link
Member

I'm not so sure this really matters, but if it does we'd need to be a little more careful about where the .close() goes since we should not assume that the user wants to close an SMBus object they've passed into the function.

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

No branches or pull requests

2 participants