pyspiflash icon indicating copy to clipboard operation
pyspiflash copied to clipboard

Fix copy-paste typo in get_capacity()

Open kuba2k2 opened this issue 1 year ago • 0 comments

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).

kuba2k2 avatar Dec 07 '23 18:12 kuba2k2