zsquareplusc / mpy-repl-tool

Yet an other tool to transfer files, execute files and so on via the Python prompt, used for MicroPython
Other
19 stars 5 forks source link

Better feedback if connect fails #14

Closed oliver-joos closed 4 years ago

oliver-joos commented 4 years ago

This branch fixes a confusing TypeError if the port is already open by another process.

This is only a temporary quick & dirty solution until the real cause of the TypeError is fixed! Until then I check if connection is lost due to a SerialException and send its exception message to stderr. This message says: "read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)"

The first commit increases the log level of message "connected to " so that one "-v" is enough to show it.

zsquareplusc commented 4 years ago

Fixed in fa7e8e5, and closing this one, as it is not a special case with SerialException but calling traceback.print_exc that way was the problem.