tuya-cloudcutter / bk7231tools

This is a collection of tools to interact with and analyze artifacts for BK7231 MCUs
MIT License
38 stars 6 forks source link

Fix exception on POSIX systems #11

Closed zultron closed 1 year ago

zultron commented 1 year ago

In bk7231tools.serial.BK7231Serial.__init__(), after initializing the serial.Serial object, calling its set_buffer_size() method results in the following exception.

AttributeError: 'Serial' object has no attribute 'set_buffer_size'
File "[...]/bk7231tools/serial/__init__.py", line 28, in __init__

That method is peculiar to the Windows implementation, and doesn't exist in the POSIX (or java) implementations.