If a connection is lost during a file transfer (e.g. serial port is disconnected), the transfer will fail and an exception is thrown. This is expected, naturally.
However, the connection is also removed from _buses so the finally block will throw "The given key 'xxx' was not present in the dictionary.' and the "real" exception is lost.
If a connection is lost during a file transfer (e.g. serial port is disconnected), the transfer will fail and an exception is thrown. This is expected, naturally.
However, the connection is also removed from
_buses
so the finally block will throw "The given key 'xxx' was not present in the dictionary.' and the "real" exception is lost.