Open sleepydog3 opened 1 year ago
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.
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