SerialFlash.get_capacity() calls raise instead of return, which causes the following error:
E: TypeError: exceptions must derive from BaseException
E: |-- File "C:\Dev\Python310\lib\site-packages\spiflash\serialflash.py", line 153, in get_capacity
I was trying to use get_capacity() instead of len(flash) because the latter is not recognized by IntelliJ (missing __len__ in the base SerialFlash class).
SerialFlash.get_capacity()
callsraise
instead ofreturn
, which causes the following error:I was trying to use
get_capacity()
instead oflen(flash)
because the latter is not recognized by IntelliJ (missing__len__
in the baseSerialFlash
class).